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

问题描述 投票:0回答:1

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

mvn 全新安装-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

如果有人可以建议我的系统有什么问题,那就太好了?

maven-2 maven-3
1个回答
0
投票

我遇到了同样的问题,就像评论所暗示的那样是 maven 代理。设置于

© www.soinside.com 2019 - 2024. All rights reserved.