Update to m2e 1.6 resulted in "Conflicting lifecycle mapping" error
Asked Answered
K

2

7

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?

Kulsrud answered 30/6, 2015 at 9:52 Comment(0)
R
6

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

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

Rationalism answered 10/9, 2015 at 18:10 Comment(1)
I missed that update till now, thanks for the disclosure.Kulsrud
P
1

I faced the same conflict problem when upgrading from m2e 1.6.0 to m2e 1.6.1, but on the maven-compiler-plugin configured for using the groovy-eclipse-compiler.

After investigation, I found this commit that might very well be at the origin of the error since it changes the way configurators are loaded and can result in loading more configurators. In my case, it seems like both default compiler configurator and groovy eclipse compiler configurator are loaded thus resulting in a conflict.

Patter answered 3/7, 2015 at 17:42 Comment(1)
Ok, but have you been able to fix the problem somehow?Bander

© 2022 - 2024 — McMap. All rights reserved.