Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.10 from http://repo1.maven.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
打开:
~\.m2\repository\org\apache\maven\plugins\maven-surefire-plugin\2.10
的话,会发现里面只有一个
maven-surefire-plugin-2.10.pom.lastUpdated
的文件.
而并没有maven-surefire-plugin-2.10.jar
解决办法:
1.删除maven-surefire-plugin-2.10.pom.lastUpdated文件
2.右键点击project -> Maven - Update Maven Project,如图
如果点击更新后发现
~\.m2\repository\org\apache\maven\plugins\maven-surefire-plugin\2.10
下还是没有maven-surefire-plugin-2.7.1.jar
去http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.10/