admin管理员组文章数量:1618712
1. 错误信息:
在cmd内查看Maven能不能正常使用。
输入命令:mvn help:system
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.239 s
[INFO] Finished at: 2019-04-11T19:12:21+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-help-plugin:3.1.1:system (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-help-plugin:3.1.1:system failed: Plugin org.apache.maven.plugins:maven-help-plugin:3.1.1 or one of its dependencies could not be resolved: Could not transfer artifact org.codehaus.plexus:plexus-component-annotations:jar:1.7.1 from/to central (https://repo.maven.apache/maven2): Connect to repo.maven.apache:443 [repo.maven.apache/151.101.196.215] failed: Connection timed out: connect -> [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/confluence/display/MAVEN/PluginResolutionException
2. 解决方案
最后经过排查,发现用的默认国外服务器的问题,改为aliyun的后,问题解决。
方法如下:
修改Maven的settings.xml文件,在mirrors标签内添加:
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun/nexus/content/groups/public</url>
</mirror>
最后终于看到了SUCCESS。
这样构建JavaWeb项目也没了问题。
版权声明:本文标题:Maven--Build Failure 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1728785504a1173274.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论