简体   繁体   English

m2e不支持2.4之前的maven-resources-plugin“

[英]“maven-resources-plugin prior to 2.4 is not supported by m2e”

I'm having problems with m2e (Maven plugin into Eclipse IDE). 我遇到了m2e(Eclipse IDE中的Maven插件)的问题。

I see the following error: maven-resources-plugin prior to 2.4 is not supported by m2e. 我看到以下错误:m2e不支持2.4之前的maven-resources-plugin。 Use maven-resources-plugin version 2.4 or later. 使用maven-resources-plugin版本2.4或更高版本。

I have no idea how to resolve this error. 我不知道如何解决此错误。 I'm pretty sure it is an m2e issue (maybe a setup thing?). 我很确定这是一个m2e问题(也许是设置问题?)。

Background: 背景:

  1. I'm attempting to build Tika v0.9 http://svn.apache.org/repos/asf/tika/tags/0.9/ 我正在尝试构建Tika v0.9 http://svn.apache.org/repos/asf/tika/tags/0.9/
  2. I can build using Maven from command line. 我可以从命令行使用Maven构建。
  3. I can build using Netbeans v7.0.1. 我可以使用Netbeans v7.0.1构建。
  4. I am running Maven 3.0.3. 我正在运行Maven 3.0.3。
  5. I am running Eclipse Indigo Service Release 1 (Build id: 20110916-0149) 我正在运行Eclipse Indigo Service Release 1(Build id:20110916-0149)
  6. I am running m2e v1.0.100.20110804-1717 我正在运行m2e v1.0.100.20110804-1717

Thanks for any help. 谢谢你的帮助。

Albert 阿尔伯特

In the tika.parent project you can find org.apache.apache.6 as parent: 在tika.parent项目中,您可以找到org.apache.apache.6作为父项:

  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>6</version>
    <relativePath />
  </parent>

And in the pom.xml from org.apache apache you can find: 在org.apache apache的pom.xml中,您可以找到:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-resources-plugin</artifactId>
  <version>2.3</version>
  <configuration>
    <encoding>${project.build.sourceEncoding}</encoding>
  </configuration>
</plugin>

First simple solution: 第一个简单的解

add the following into the pom of tika.parent under "build - pluginManagement - plugins" (line 230): 在“build - pluginManagement - plugins”(第230行)下将以下内容添加到tika.parent的pom中:

    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-resources-plugin</artifactId>
      <version>2.5</version>
      <configuration>
        <encoding>${project.build.sourceEncoding}</encoding>
      </configuration>
    </plugin>
  ...

And then ask the tika team to use a newer org.apache apache parent pom. 然后让tika团队使用更新的org.apache apache父pom。

Another solution which worked for me is : 1) Uninstall all the existing Maven plugins from Ecplise. 另一个对我有用的解决方案是:1)从Ecplise卸载所有现有的Maven插件。 2) Then install Maven plugin from this location : http://m2eclipse.sonatype.org/sites/m2e -Rushi 2)然后从这个位置安装Maven插件: http ://m2eclipse.sonatype.org/sites/m2e -Rushi

How did you import your project into eclipse? 你是如何将项目导入eclipse的? (the mvn eclipse:eclipse goal, or "import maven project" in Eclipse?) mvn eclipse:eclipse目标,还是Eclipse中的“import maven project”?)

Maybe this answer is of relevance: Error in POM.xml 也许这个答案是相关的: POM.xml中的错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM