我试图使用Maven (m2eclipse)建立一个项目,但我在Eclipse中得到这个错误:
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
什么好主意吗?
如果你能告诉我如何检查是否一切配置正常,那就太有帮助了。
在我的例子中,我在spring工具4中得到了这个错误消息
ArtifactTransferException: org.codehaus.plexus:plexus-interpolation:jar:1.26 failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.codehaus.plexus:plexus-interpolation:jar:1.26 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org java.lang.reflect.InvocationTargetException
这是解决方案
步骤01 -首先关闭弹簧工具应用程序
步骤02 -进入路径C:\Users\User并删除。m2文件夹
步骤03 -现在去包探索和选择你的项目
第04步-现在右键单击您的项目,进入Maven,单击更新项目
如何卸载Spring Tool 4
步骤01 -单击帮助并转到关于Spring工具套件4
步骤02 -现在点击安装细节
步骤03 -在里面,你可以看到所有已安装的软件,只需按Ctrl + A选择所有,然后单击卸载
创建一个文件delete_lastUpdated_and_remote.sh(使用\n):
#!/bin/bash
find $(cd $(dirname $0); pwd) -name "*.lastUpdated" -type f -print -exec rm -rf {} \;
find $(cd $(dirname $0); pwd) -name "_remote.repositories" -type f -print -exec rm -rf {} \;
把它放在本地Maven repo中,例如%userprofile%\。M2 \repository或~/。M2 /repository,并运行它。
在windows中,你也应该安装Git来运行sh文件。
我也用在jenkins的工作上。