Maven的报错之Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4

报错源码
Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from http://maven.aliyun.com/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus-aliyun 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 nexus-aliyun (http:// maven.aliyun.com/nexus/content/groups/public): maven.aliyun.com

翻译为
未能传输org.apache.maven.plugins:maven-sure防火插件:pom:2.12.4,来自http://maven.aliyun.com/nexus/content/group/public
在本地存储库中缓存,在nexus-aliyun的更新间隔过期或更新之后,解析将不会被重新尝试。
原始错误:不能传输工件。apache.maven.plugins:maven-sure防火插件:pom:2.12.4从/到nexus-aliyun(http://
maven.aliyun.com/nexus/content/groups/public):maven.aliyun.com

原因是猜测可能跟在nexus-aliyun的更新间隔过期或更新之后,解析将不会被重新尝试。这句话有关,但是本人也不太清楚。或者是文件格式有问题,因为在查询资料是看到一片说跟转换符有关,要把settings.xml改成成utf-8(这个方法请慎重尝试,本人没有用着个方法解决本问题。)
解决方案:
1.把本地仓库里的org删除重新下载。或者把仓库里的东西全删除,重新下载。(建议后者)
2.项目右键-->maven-->Update Dependencies(记得把Force Update of Snapshots/Releases钩上不然不会更新)

猜你喜欢

转载自blog.csdn.net/qq_41323013/article/details/82631196