maven从远程仓库更新失败jar包的问题处理-- Failure to transfer xxx.jar
使用eclipse导入guns项目时,爆出了一些jar包错误
Description Resource Path Location Type Could not calculate build plan:、
Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.0.2 from
http://repo1.maven.org/maven2 was cached in the local repository,
这样子就需要删除所有失败的更新(即仓库中所有以.lastUpdated结尾的文件)。
linux:cd到maven本地仓库目录,执行如下命令:
find ~/.m2 -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;
window:cmd下cd到maven本地仓库目录,执行如下命令:
for /r %i in (*.lastUpdated) do del %i
然后到工程中选择 Maven->"Update Project …"就可以了,是不是非常的克来玩儿呢~