【问题标题】:error while loading maven project into eclipse将maven项目加载到eclipse中时出错
【发布时间】:2012-12-13 12:05:55
【问题描述】:

我正在使用 Maven 2.2.0 和 Eclipse Juno。我正在尝试将现有 Maven 项目之一导入工作区。

我收到以下错误。

  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 存储库,由于服务器问题没有像往常一样获取。
  • @kellogs。我直接从远程机器上复制了它。我没有像往常一样下载它。我刚才检查了我的 pom.xml,在那里我找不到任何 id 为 maven-resources-plugin 的工件。
  • 我相信“maven-resources-plugin”是你应该从 maven repos 下载的东西
  • 以上消息只是摘录,因为通常maven会打印出更多信息,特别是关于下载/下载等的信息? (我建议对 Maven 3 进行更新)。

标签: java eclipse maven maven-2 m2eclipse


【解决方案1】:

我刚刚得到了这个问题的答案。

已添加<localRepository>${user.home}/.m2/repository</localRepository>

我看到 .m2 存储库中已经存在 2.5 文件夹,所以添加了这个以停止再次从存储库下载。

在eclipse中--window--pref--maven--check the path for settings.xml。它应该是有效的路径。

它解决了我的问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-04-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多