gpt4 book ai didi

java - pom.xml 中出现错误。显示连接超时。我的网络代理不允许连接到 Maven

转载 作者:行者123 更新时间:2023-12-01 09:26:51 31 4
gpt4 key购买 nike

当我尝试在项目中使用 Maven 时,构建时出现以下错误:

CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.5.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:3.5.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.5.1 from/to central (https://repo.maven.apache.org/maven2): connect timed out

最佳答案

您的连接已超时 - 确保您已连接到互联网(例如,尝试从命令行ping repo.maven.apache.org)。如果您位于代理服务器后面,则必须相应地添加配置 ( https://maven.apache.org/guides/mini/guide-proxies.html )。

一旦您确保互联网连接正常,您可以通过在命令中附加 -U 标志来强制 Maven 重新尝试传输。

关于java - pom.xml 中出现错误。显示连接超时。我的网络代理不允许连接到 Maven,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39763670/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com