日食juno中的maven安装错误

时间:2014-05-12 12:51:36

标签: maven eclipse-juno

当我尝试在eclipse juno中安装maven时,我遇到了这个错误。 错误详情:

Multiple annotations found at this line:
    - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (execution: default-compile, phase: 
     compile)
    - CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: 
     Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: The repository system is offline but the 
     artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 is not available in the local repository.
    - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (execution: default-testCompile, 
     phase: test-compile)
如果知道正确的答案,请帮助我。

谢谢

1 个答案:

答案 0 :(得分:3)

如果你落后于代理,请务必在maven的settings.xml中定义它。我猜您正在使用外部maven安装,因此您可以在MAVEN_HOME/conf中找到此文件。在此文件中搜索<proxies> </proxies>标记,并查看这些标记之间的示例,了解如何设置代理。 还要确保在Eclipse中选择外部maven安装(Preferences > Maven > Installations)。最后一步是将用户设置(Preferences > Maven > User Setting)配置为指向settings.xml(全局和用户)。运行更新项目,错误应该消失。

请注意,如果您移至没有代理的网络,则应在settings.xml中注释掉已定义的代理,或在<active>false</active>代码中设置<proxy>代码。