【问题标题】:General Eclipse Maven Error?一般 Eclipse Maven 错误?
【发布时间】:2014-04-30 02:06:20
【问题描述】:

每当我尝试用我的 eclipse 开普勒做任何事情时,我都会收到这个错误:

  Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'PcsOne-Persistence'.
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
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

我已经尝试了所有方法来解决这个问题,但没有成功:

例子:

  1. 我已尝试卸载并重新安装 eclipse。
  2. 清理和安装项目。
  3. 炸毁 .m2 存储库并重新更新所有依赖项。
  4. 为 Eclipse 安装 Maven 插件(显示 kepler 没有更新)

无论我做什么,我都会收到几天前在相同设置中不存在的这个错误。它突然冒出来了。

这里可能出了什么问题?

更新: 这是我的 Pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
          <modelVersion>4.0.0</modelVersion>
          <groupId>com.mycomp.groupid</groupId>
          <artifactId>MyProject-1.0</artifactId>
          <version>1.0-SNAPSHOT</version>
</project>

【问题讨论】:

  • @chrylis 确定它对于其中一个项目非常简单。将更新我的问题。敬请期待!

标签: java eclipse maven


【解决方案1】:

我时不时会出现这些问题,原因包括:

  1. 无法通过网络访问存储库
  2. 插件上的版本/组/工件 ID 错误
  3. Eclipse maven 设置错误(与 maven 的系统设置相比)
  4. 添加了包含一个或多个工件/插件的错误副本的私有存储库
  5. 重构 pom 以将内容移入父 pom 有时会无意中破坏与该父 pom 的链接或继承

我建议您尝试从命令行运行构建(删除一些可能出错的东西)。尝试构建一个非常简单的 Maven 项目。再次检查插件标识符。

【讨论】:

    【解决方案2】:

    好的,我解决了这个问题。为了其他观众的利益,问题出在 maven m2e 连接器上。有一个这些插件的列表,包括“生命周期映射”插件。在进行了一些更改后 - 不幸的是我不记得我做了什么,错误的性质发生了变化。

    新的异常提示我进入 eclipse 市场中的这些插件列表。安装它们解决了这个问题。 Eclipse 版本是开普勒,我使用了外部 Maven(不是嵌入式的)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-07-25
      • 2012-11-14
      • 1970-01-01
      • 1970-01-01
      • 2015-02-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多