连接到Maven存储库时连接超时

时间:2017-01-20 03:27:18

标签: maven-2 maven-3

我正在尝试使用以下命令在本地系统中构建我的项目

mvn clean install -Dmaven.test.skip = true

失败并出现以下错误。它无法连接到repo.maven.apache.org。

我ping了服务器repo.maven.apache.org,我可以看到回复。

我正在使用maven 3版本并连接到maven 2 repo(repo.maven.apache.org)。

  [INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building web-order-avpn 1702.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: **https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom**
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.778 s
[INFO] Finished at: 2017-01-19T21:21:10-06:00
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] 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: 
Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central
 (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.56.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.org/confluence/display/MAVEN/PluginResolutionException

如果有人可以建议我的系统有什么问题会很好吗?

1 个答案:

答案 0 :(得分:0)

我也遇到了同样的问题,就像评论所建议的那样,它是maven代理。在\ conf \ settings.xml

中进行设置

http://maven.apache.org/guides/mini/guide-proxies.html