![](/img/trans.png)
[英]Error in the pom.xml file for Maven version it shows following error “”
[英]Maven pom.xml file shows error
我从git hub克隆了一个Maven项目。 但是在pom文件中它显示error.git hub项目没有任何错误。 因为它可以在另一台机器上完美运行,而且我也不在任何代理服务器后面。 我尝试了stackoverflow中的大多数解决方案。 但是我无法克服这个问题。
错误
Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.10 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.10 from/to central (http://
repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/
plugins/maven-surefire-plugin/2.10/maven-surefire-plugin-2.10.pom
到目前为止我做了什么?
什么都不适合我。 请帮助我.....
转到您的本地存储库(通常位于.m2下),然后搜索org / apache / maven / plugins / maven-surefire-plugin目录。 您将找到一个“占位符”-尝试删除此目录并尝试重新构建。
然后,我建议从命令行而不是从任何其他工具(如eclipse) 构建项目 ,因为所有IDE都可能会遇到问题,因此首先让我们确保项目可以从命令行成功编译,然后我们才尝试解决IDE问题。
此外,@ ben是正确的-您可以运行mvn -U clean install
强制maven下载新副本。
尝试
找到〜/ .m2-名称“ * .lastUpdated” -exec grep -q“无法传输” {} \\; -print -exec rm {} \\;
尝试禁用Maven性质,然后再次启用Maven。
尝试是可行的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.