【发布时间】:2014-04-04 22:18:40
【问题描述】:
我的 pom.xml 的第一行出现以下错误
Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from http://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-surefire-plugin:pom:2.12.4 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org
【问题讨论】:
-
您是否尝试过强制更新?看this question。
-
嗨,是的,我已经尝试更新它,但现在我该如何修复它。?
-
我发现在这种情况下强制更新对我有用,只要 Maven 正在寻找的工件存在于它正在寻找它的位置。对我来说,当消息显示
resolution will not be reattempted until the update interval of central has elapsed or updates are forced时,我会强制更新以删除消息。如链接问题中所述,您可以使用 Eclipse 中的设置来强制更新,也可以使用命令行中的-U标志来强制更新。