我试图使用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

什么好主意吗? 如果你能告诉我如何检查是否一切配置正常,那就太有帮助了。


当前回答

我得到这个错误的插件如下:

<groupId>org.codehaus.mojo</groupId>  
<artifactId>jaxb2-maven-plugin</artifactId>  
<version>2.5</version>  

我修改标签版本为:

<version>2.5.0</version>  

然后在eclipse中打开项目的上下文菜单,选择Maven >“更新项目…”,确保对话框中选中了“更新依赖项”,然后点击“确定”按钮。

其他回答

这在Windows中也适用。

Locate the {user}/.m2/repository (Using Juno /Win7 here) In the Search field in upper right of window, type ".lastupdated". Windows will look through all subfolders for these files in the directory. (I did not look through cache.) Remove them by Right-click > Delete (I kept all of the lastupdated.properties). Then go back into Eclipse, Right-click on the project and select Maven > Update Project. I selected to "Force Update of Snapshots/Releases". Click Ok and the dependencies finally resolved correctly.

设置。xml代理? 在eclipse中有maven全局\本地配置文件,添加settings.xml

我得到这个错误的插件如下:

<groupId>org.codehaus.mojo</groupId>  
<artifactId>jaxb2-maven-plugin</artifactId>  
<version>2.5</version>  

我修改标签版本为:

<version>2.5.0</version>  

然后在eclipse中打开项目的上下文菜单,选择Maven >“更新项目…”,确保对话框中选中了“更新依赖项”,然后点击“确定”按钮。

只需删除maven本地存储库中的原型。如上所述,它发生在原型下载失败的情况下。

在eclipse中给出正确的maven settings .xml路径。

Windows——>首选项——> Maven——>用户设置

在“用户设置”文本框中输入正确的“setting.xml”路径