5

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

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347
Albert
  • 523
  • 2
  • 5
  • 5

3 Answers3

7

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.

ollins
  • 1,851
  • 12
  • 16
  • Try the following additional steps: - Select all Projects and "Right click"->Maven->Update Project Configuration - Select all Projects and in Menu -> Project -> Clear ... (all) – ollins Oct 03 '11 at 19:21
1

Another solution which worked for me is : 1) Uninstall all the existing Maven plugins from Ecplise. 2) Then install Maven plugin from this location : http://m2eclipse.sonatype.org/sites/m2e -Rushi

Rushi Shah
  • 2,031
  • 2
  • 14
  • 10
1

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

Community
  • 1
  • 1
andrel
  • 1,144
  • 11
  • 25