I am adding to the blogosphere of development-related blogs another post about the “Plugin execution not covered by lifecycle configuration” error.
The M2E Plugin 1.0.0 is integrated into Eclipse Indigo (3.7). Apparently, M2E connectors, which are a bridge between Maven and Eclipse, require to provide a connector for every plugin that is used in the build.
And if no connector is available, M2E shows the following annoying errors in the Eclipse problems view :
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-antrun-plugin:1.7:run (execution: run, phase: validate)
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-resources-plugin:2.5:resources (execution: default-resources, phase: process-resources)
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-resources-plugin:2.5:testResources (execution: default-testResources, phase: process-test-resources)
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2:read-project-properties (execution: default, phase: initialize)
Plugin execution not covered by lifecycle configuration: org.apache.cxf:cxf-codegen-plugin:2.2:wsdl2java (execution: generate-sources, phase: generate-sources)
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:hibernate3-maven-plugin:3.0-SNAPSHOT:hbm2ddl (execution: default, phase: compile)
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-ear-plugin:2.6:generate-application-xml
To avoid these errors, it is necessary to modify the pom.xml file so that M2E will not complain about it.
These are the extra lines that I added in my parent pom.xml :
<build>
<pluginManagement>
<plugins>
<!--The configuration of this plugin is used to store the 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.7,)</versionRange>
<goals>
<!-- plugin goals-->
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<!-- M2E should ignore the plugin-->
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<versionRange> [2.5,)</versionRange>
<goals>
<!-- plugin goals-->
<goal>resources</goal>
<goal> testResources </goal>
</goals>
</pluginExecutionFilter>
<action>
<!-- M2E should ignore the plugin-->
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<versionRange> [1.0-alpha-2,)</versionRange>
<goals>
<!-- plugin goals-->
<goal>read-project-properties</goal>
</goals>
</pluginExecutionFilter>
<action>
<!-- M2E should ignore the plugin-->
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<versionRange> [2.2,)</versionRange>
<goals>
<!-- plugin goals-->
<goal>wsdl2java</goal>
</goals>
</pluginExecutionFilter>
<action>
<!-- M2E should ignore the plugin-->
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<versionRange> [3.0-SNAPSHOT,)</versionRange>
<goals>
<!-- plugin goals-->
<goal>hbm2ddl</goal>
</goals>
</pluginExecutionFilter>
<action>
<!-- M2E should ignore the plugin-->
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<versionRange> [2.6,)</versionRange>
<goals>
<!-- plugin goals-->
<goal>generate-application-xml</goal>
</goals>
</pluginExecutionFilter>
<action>
<!-- M2E should ignore the plugin-->
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
...
</plugins>
</pluginManagement>
</build>
Links :
http://wiki.eclipse.org/M2E_plugin_execution_not_covered
http://objectledge.org/confluence/display/TOOLS/M2E+Connectors