Maven项目常见的小问题

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,问题就可以解决了

 

posted @ 2017-10-30 18:02  海棠--依旧  Views(178)  Comments(0Edit  收藏  举报