本文主要是介绍maven安装好后cmd中执行mvn helpsystem报错,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.安装好maven,配置好环境变量之后,在cmd执行mvn -v没问题则表示成功
2.执行mvn help:system报错,则是仓库位置有错误:
[INFO] Scanning for projects…
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.5 is missing, no dependency information available
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar
[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: Could not find artifact org.apache.maven.plugins:maven-clean-plugin:jar:2.5 in mirrorId (http://mvnrepository.com/)
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom
[WARNING] The POM for org.apache.maven.plugins:maven-install-plugin:jar:2.4 is missing, no dependency information available
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.jar
[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: Could not find artifact org.apache.maven.plugins:maven-install-plugin:jar:2.4 in mirrorId (http://mvnrepository.com/)
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
[WARNING] The POM for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7 is missing, no dependency information available
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.jar
[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: Could not find artifact org.apache.maven.plugins:maven-deploy-plugin:jar:2.7 in mirrorId (http://mvnrepository.com/)
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugin-3.3.pom
[WARNING] The POM for org.apache.maven.plugins:maven-site-plugin:jar:3.3 is missing, no dependency information available
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugin-3.3.jar
[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: Could not find artifact org.apache.maven.plugins:maven-site-plugin:jar:3.3 in mirrorId (http://mvnrepository.com/)
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom
[WARNING] The POM for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3 is missing, no dependency information available
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.jar
[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: Could not find artifact org.apache.maven.plugins:maven-antrun-plugin:jar:1.3 in mirrorId (http://mvnrepository.com/)
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom
[WARNING] The POM for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5 is missing, no dependency information available
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.jar
[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: Could not find artifact org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5 in mirrorId (http://mvnrepository.com/)
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.pom
[WARNING] The POM for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8 is missing, no dependency information available
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.jar
[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: Could not find artifact org.apache.maven.plugins:maven-dependency-plugin:jar:2.8 in mirrorId (http://mvnrepository.com/)
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-release-plugin/2.5.3/maven-release-plugin-2.5.3.pom
[WARNING] The POM for org.apache.maven.plugins:maven-release-plugin:jar:2.5.3 is missing, no dependency information available
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-release-plugin/2.5.3/maven-release-plugin-2.5.3.jar
[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: Could not find artifact org.apache.maven.plugins:maven-release-plugin:jar:2.5.3 in mirrorId (http://mvnrepository.com/)
Downloading from mirrorId: http://mvnrepository.com/org/apache/maven/plugins/maven-metadata.xml
Downloading from mirrorId: http://mvnrepository.com/org/codehaus/mojo/maven-metadata.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.293 s
[INFO] Finished at: 2018-07-17T18:28:05+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 (F:mavenDownloadKudownload), mirrorId (http://mvnrepository.com/)] -> [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
解决:修改settings.xml的mirrors:
修改前:
修改后:
问题出在了镜像服务器地址上,之前没增加仓库位置,增加maven仓库的镜像地址:
http://repo1.maven.org/maven2
然后再执行mvn help:system就可以下载成功了
这篇关于maven安装好后cmd中执行mvn helpsystem报错的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!