eclipsemavenm2emaven-war-pluginm2e-wtp

Update to m2e 1.6 resulted in "Conflicting lifecycle mapping" error


After I've run an update in my Eclipse Luna SR2 (4.4.2) I got m2e 1.6.1.20150625-2338 installed. For a project where I use maven-war-plugin now I get the following errors in the problems view:

problems view

Full text:

Conflicting lifecycle mapping (plugin execution "org.apache.maven.plugins:maven-war-plugin:2.3:war (execution: war-standalone, phase: package)"). To enable full functionality, remove the conflicting mapping and run Maven->Update Project Configuration.

Conflicting lifecycle mapping (plugin execution "org.apache.maven.plugins:maven-war-plugin:2.3:war (execution: war-standalone, phase: package)"). To enable full functionality, remove the conflicting mapping and run Maven->Update Project Configuration.

The plugin configuration didn't cause a problem with the previous version of m2e. It looks ok in the pom, nothing unusual:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <executions>
        <execution>
            <id>war-standalone</id>
            <goals>
                <goal>war</goal>
            </goals>
            <phase>package</phase>
            <configuration>
                ...
            </configuration>
        </execution>
        <execution>
            <id>war-overlay</id>
            <goals>
                <goal>war</goal>
            </goals>
            <phase>package</phase>
            <configuration>
                ...
            </configuration>
        </execution>
    </executions>
</plugin>

The lifecycle-mapping for maven-war-plugin isn't configured in the pom. I checked if it is in parent poms but couldn't find anything. None is in the workspace lifecycle mappings metadata as well.

Then I noticed m2e-wtp plugin (where the mapping seems to come from) was still an old version. I updated it to 1.2.0.20150602-1740 but it didn't resolve the problem.

Any idea how to track down where is the conflicting mapping or maybe how to resolve the issue properly?


Solution

  • The problem has been reported and a bug has been created for that.

    Note that it has been fixed in m2e v1.6.2.