在 Eclipse Luna SR2 (4.4.2) 中运行更新后,我安装了 m2e 1.6.1.20150625-2338。对于我使用 maven-war-plugin
的项目,我现在在问题 View 中收到以下错误:
全文:
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.
该插件配置对于之前版本的 m2e 没有造成问题。在 pom 中看起来没问题,没有什么异常:
<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>
pom.xml 中未配置 maven-war-plugin
的生命周期映射。我检查了它是否在父 pom 中,但找不到任何内容。工作区生命周期映射元数据中也没有。
然后我注意到 m2e-wtp 插件(映射似乎来自于此)仍然是旧版本。我将其更新到1.2.0.20150602-1740,但没有解决问题。
知道如何找出冲突的映射在哪里或者如何正确解决问题吗?
最佳答案
该问题已报告,并且 bug为此而创建。
请注意,它已在 m2e v1.6.2 中修复。
关于eclipse - 更新到 m2e 1.6 导致 "Conflicting lifecycle mapping"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31135002/