Wednesday, September 2, 2015

Eclipse maven Plugin execution not covered by lifecycle configuration error

Eclipse maven Plugin execution not covered by lifecycle configuration error

After checkout the project from SVN, Eclipse complained the below error:
Plugin execution not covered by lifecycle configuration: org.jibx:jibx-maven-plugin:1.2.3:bind (execution: bind, phase: process-classes)
Maven Project Build Lifecycle Mapping Problem

While if I run mvn package from the command line, it has no problem.
It's actually an issue of m2e plugin:
https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html

There are three ways to fix it as I know:
1. Ignore this error by updating Preferences->Maven_Errors/Warnings->Plugin execution not covered by lifecycle configuration
2. Update the phase to any other string like m2eissue to diable it within Eclipse (do not submit)
3. Configure the plugin management to instruct m2e what should it do like:
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-antrun-plugin
</artifactId>
<versionRange>
[1.6,)
</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.jibx</groupId>
<artifactId>
jibx-maven-plugin
</artifactId>
<versionRange>
[1.2.3,)
</versionRange>
<goals>
<goal>bind</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>


No comments:

Post a Comment