新建Maven项目,报错:
Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 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
原因提示maven-surefire-plugin这插件没有下载成功
查看目录
~\.m2\repository\org\apache\maven\plugins\maven-surefire-plugin\
发现里面有 jar包:
如果没有,把里面的内容删掉,重新maven -> update project,重新下载!
但是目录里有包:
clear 下项目,错误依旧!
这些要查看eclipse的maven配置:
查看maven配置
要把maven设置成自己的本地安装的maven目录!
再重新maven -> update project! Ok!