1. 程式人生 > >在eclipse中建立maven總是失敗

在eclipse中建立maven總是失敗

在命令提示符中執行  mvn -v  得到結果:

但是緊接著執行:mvn help:system是就出現了下面的問題:

C:\Users\xuweibin>mvn help:system
[INFO] Scanning for projects...
Downloading from nexus: http://192.168.10.210:8088/repository/maven-public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
Downloading from nexus: http://192.168.10.210:8088/repository/maven-public/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.4: Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4
Downloading from nexus: http://192.168.10.210:8088/repository/maven-public/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7
Downloading from nexus: http://192.168.10.210:8088/repository/maven-public/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugin-3.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.3: Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.3
Downloading from nexus: http://192.168.10.210:8088/repository/maven-public/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3
Downloading from nexus: http://192.168.10.210:8088/repository/maven-public/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5
Downloading from nexus: http://192.168.10.210:8088/repository/maven-public/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.8: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8
Downloading from nexus: http://192.168.10.210:8088/repository/maven-public/org/apache/maven/plugins/maven-release-plugin/2.5.3/maven-release-plugin-2.5.3.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.5.3: Plugin org.apache.maven.plugins:maven-release-plugin:2.5.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:2.5.3
Downloading from nexus: http://192.168.10.210:8088/repository/maven-public/org/codehaus/mojo/maven-metadata.xml
Downloading from nexus: http://192.168.10.210:8088/repository/maven-public/org/apache/maven/plugins/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to nexus (http://192.168.10.210:8088/repository/maven-public/): Connect to 192.168.10.210:8088 [/192.168.10.210] failed: Connection refused: connect
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to nexus (http://192.168.10.210:8088/repository/maven-public/): Connect to 192.168.10.210:8088 [/192.168.10.210] failed: Connection refused: connect
[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from http://192.168.10.210:8088/repository/maven-public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to nexus (http://192.168.10.210:8088/repository/maven-public/): Connect to 192.168.10.210:8088 [/192.168.10.210] failed: Connection refused: connect
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from http://192.168.10.210:8088/repository/maven-public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to nexus (http://192.168.10.210:8088/repository/maven-public/): Connect to 192.168.10.210:8088 [/192.168.10.210] failed: Connection refused: connect
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.353 s
[INFO] Finished at: 2018-04-11T16:54:06+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'help' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (D:\Program Files\MAVEN_HOME), nexus (http://192.168.10.210:8088/repository/maven-public/)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException


在工具中創建出現如下問題:




eclipse中的配置如下:



在setting.xml檔案中配置了本地倉庫:




剛開始實習,接觸maven時間不長,遇到這問題解決不了   直接炸毛了  ,望各位大佬多多指正