将Maven Project导入Eclipse时出错

时间:2014-04-29 08:10:10

标签: spring maven

如果我稍后给予解决并进入eclipse,我会在Pom.xml中收到错误

Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from http://repo.maven.apache.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-resources-plugin:pom:2.5 
from/to central (http://repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.pom

2 个答案:

答案 0 :(得分:1)

转到您当地的.m2文件夹(c:\ users \ .m2),选择目录org\apache\maven\plugins\maven-resources-plugin,然后将其删除。

然后在eclipse <project-root>\maven\Update Project...

中使用

答案 1 :(得分:0)

有时Maven无法正确下载依赖项。

您可以右键单击该项目,然后选择Maven->Update Project。然后,请确保选中Force Update of Snapshot/Releases复选框,然后按OK