Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"maven-resources-plugin prior to 2.4 is not supported by m2e"

I'm having problems with m2e (Maven plugin into Eclipse IDE).

I see the following error: maven-resources-plugin prior to 2.4 is not supported by m2e. Use maven-resources-plugin version 2.4 or later.

I have no idea how to resolve this error. I'm pretty sure it is an m2e issue (maybe a setup thing?).

Background:

  1. I'm attempting to build Tika v0.9 http://svn.apache.org/repos/asf/tika/tags/0.9/
  2. I can build using Maven from command line.
  3. I can build using Netbeans v7.0.1.
  4. I am running Maven 3.0.3.
  5. I am running Eclipse Indigo Service Release 1 (Build id: 20110916-0149)
  6. I am running m2e v1.0.100.20110804-1717

Thanks for any help.

Albert

like image 402
Albert Avatar asked Sep 29 '11 18:09

Albert


2 Answers

In the tika.parent project you can find org.apache.apache.6 as parent:

  <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:

<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):

    <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.

like image 182
ollins Avatar answered Oct 01 '22 17:10

ollins


How did you import your project into eclipse? (the mvn eclipse:eclipse goal, or "import maven project" in Eclipse?)

Maybe this answer is of relevance: Error in POM.xml

like image 43
andrel Avatar answered Oct 01 '22 17:10

andrel