【问题标题】:Maven project Creation - While creating project from Eclipse failedMaven 项目创建 - 从 Eclipse 创建项目失败
【发布时间】:2014-02-28 17:16:59
【问题描述】:

我能够从命令行创建 maven 项目,但无法从 eclipse 创建项目。我在 eclipse 中配置了与外部相同的 maven。当我尝试创建 Maven 项目时,它给了我以下错误。如何解决以下错误。

我的eclipse版本是kepler

 Could not calculate build plan: Plugin org.apache.maven.plugins:maven- resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to   read artifact descriptor for org.apache.maven.plugins:maven-resources-  
  plugin:jar:2.5
 Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5

请指教。

【问题讨论】:

  • 您是否在使用代理,比如说在工作中?您可以尝试删除 .m2/repository/org/apache/maven/plugins/maven-resources-plugin/2.5 或您的 Maven 存储库所在的任何位置的所有内容。
  • 从 .m2 位置删除 jar 文件后,再次出现相同的错误。
  • 只有 jar 文件?我会尝试删除所有内容。
  • 我删除了 .m2 本身。当我再次创建项目时,使用所有文件创建 .m2。但出现相同的错误。
  • 尝试在 Debug output 开启的情况下运行 Maven:stackoverflow.com/questions/16898801/…

标签: eclipse maven maven-3 maven-plugin jbpm


【解决方案1】:

试试这个:

1:删除 .M2 内容 2:在settings.xml中设置Proxy配置

<proxies>
<proxy>
  <active>true</active>
  <protocol>http</protocol>
  <host>proxy.com</host>
  <port>xxxx</port>
  <nonProxyHosts>local.net</nonProxyHosts>
</proxy>
</proxies>

小心!如果代理没有身份验证,请不要输入任何用户名和密码

3:关闭 Eclipse..然后重新打开

4:清理和更新项目配置

5:验证项目配置使用的java buld路径

6:尝试使用eclipse中嵌入的Maven只是为了测试,看看问题是不是外部Maven安装损坏

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-04
    • 1970-01-01
    • 2013-02-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多