还是今天,导入一个maven项目的时候遇到“Failure to transfer…”错误。
完整的错误大致如下:
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, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.0.2 from/to central (http://repo1.maven.org/maven2): No response received after 60000 ExampleProject Unknown Maven Problem
原因:谁能翻译一下上面这段话,我懂,但是写出来好累。算了,自己去查吧。现在好饿。。
解决方法:
cmd进入你的maven库。
如何找你配置的maven库?
Eclipse-----》Windows----------》Peference ------------》Maven------------》User setting

一系列cd cd 之后就进入了库咯。(我知道这样很笨。。。)

然后运行命令:
for /r %i in (*.lastUpdated) do del %i

回车。
这个就是清除你下载失败的文件的命令。然后再回去刷新一下你的maven项目,就okay咯!!
其实我这个是我再stack overflow上面找到的。看来这个问题很常见。
地址:http://stackoverflow.com/questions/5074063/maven-error-failure-to-transfer
解决Maven错误'Failure to transfer'
当导入Maven项目时遇到'Failure to transfer...'错误,原因是中央仓库无法下载插件。解决方法包括:访问Maven库配置,通过cmd进入用户设置的Maven库,执行清除失败下载文件的命令,然后刷新Maven项目。此问题常见,解决方案来源于Stack Overflow。
3083

被折叠的 条评论
为什么被折叠?



