pom.xml文件头报错

场景

例Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from https://repo.maven.apache.org/maven2 was cached in the local repository

解决方案

  • 找到本地maven仓库中maven-surefire-plugin对应的版本文件夹(一般在..\repository\org\apache\maven\plugins下),然后删除文件夹中maven-surefire-plugin-2.12.4.pom.lastUpdated
  • 右键点击项目 -> Maven -> Update Dependencies,问题就可以解决了

 

版权声明:本文为htyj原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/htyj/p/7755672.html