Eclipse + Maven: Plugin execution not covered by lifecycle configuration

In this article, we will investigate various possibilities to suppress/resolve “Plugin execution not covered by lifecycle configuration” error

After configuring/installing Maven with Eclipse IDE, you may still get some issues –> one such issue is “Plugin execution not covered by lifecycle configuration”

1_Eclipse-Maven_Plugin_Life_Cycle_not_Covered

Solution

There are two ways available to fix this issue

  1. Ignore plugin
  2. Add this plugin to Lifecycle Mapping

Ignore Plugin

Add below <pluginManagement> under <build> tag in the same pom.xml

For our example,

groupId –> org.jvnet.jax-ws-commons
artifactId –> jaxws-maven-plugin
versionRange –> [1.0.0,)
goal –> wsimport

Note: Above parameters changes according to the plugin, for which it throws this error

<pluginManagement>
	<plugins>
		<plugin>
			<groupId>org.eclipse.m2e</groupId>
			<artifactId>lifecycle-mapping</artifactId>
			<version>1.0.0</version>
			<configuration>
				<lifecycleMappingMetadata>
					<pluginExecutions>
						<pluginExecution>
							<pluginExecutionFilter>
								<groupId>org.jvnet.jax-ws-commons</groupId>
								<artifactId>jaxws-maven-plugin</artifactId>
								<versionRange>[1.0.0,)</versionRange>
								<goals>
									<goal>wsimport</goal>
								</goals>
							</pluginExecutionFilter>
							<action>
								<execute>
									<runOnIncremental>false</runOnIncremental>
								</execute>
							</action>
						</pluginExecution>
					</pluginExecutions>
				</lifecycleMappingMetadata>
			</configuration>
		</plugin>
	</plugins>
</pluginManagement>

 

Add this plugin to Lifecycle Mapping

Another way is to add this particular plugin to “Lifecycle Mapping” of Maven

Step 1: Open Eclipse –> Windows –> Preferences

Step 2: Go to Maven –> Lifecycle Mappings

And then Click “Open workspace lifecycle mappings metadata” –> which will open “lifecycle-mapping-metadata.xml” file in Eclipse editor

2_Eclipse-Maven_Plugin_Life_Cycle_not_Covered_maven_wizard

Step 3: Add below XML chunk to this file –> save the file

Finally click “Reload workspace lifecycle mappings metadata” to take effect of new changes in the working environment

<pluginExecution>
	<pluginExecutionFilter>
		<groupId>org.jvnet.jax-ws-commons</groupId>
		<artifactId>jaxws-maven-plugin</artifactId>
		<goals>
			<goal>wsimport</goal>
		</goals>
		<versionRange>[0.0,)</versionRange>
	</pluginExecutionFilter>
	<action>
		<ignore />
	</action>
</pluginExecution>

Again this is specific to “wsimport” goal and it may vary depending on the plugins configured for our business requirements

References

http://wiki.eclipse.org/M2E_plugin_execution_not_covered
https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-29778.html
http://www.benchresources.net/metro-jax-ws-soap-based-web-service-using-top-down-approach

Happy Coding !!
Happy Learning !!

Eclipse + Maven: mvn eclipse:eclipse command