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

1. Plugin execution not covered by lifecycle configuration:

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

2. Solution:

There are two ways available to fix this issue

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

2.1 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

pom.xml (partial)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
&lt;pluginManagement>
    &lt;plugins>
        &lt;plugin>
            &lt;groupId>org.eclipse.m2e&lt;/groupId>
            &lt;artifactId>lifecycle-mapping&lt;/artifactId>
            &lt;version>1.0.0&lt;/version>
            &lt;configuration>
                &lt;lifecycleMappingMetadata>
                    &lt;pluginExecutions>
                        &lt;pluginExecution>
                            &lt;pluginExecutionFilter>
                                &lt;groupId>org.jvnet.jax-ws-commons&lt;/groupId>
                                &lt;artifactId>jaxws-maven-plugin&lt;/artifactId>
                                &lt;versionRange>[1.0.0,)&lt;/versionRange>
                                &lt;goals>
                                    &lt;goal>wsimport&lt;/goal>
                                &lt;/goals>
                            &lt;/pluginExecutionFilter>
                            &lt;action>
                                &lt;execute>
                                    &lt;runOnIncremental>false&lt;/runOnIncremental>
                                &lt;/execute>
                            &lt;/action>
                        &lt;/pluginExecution>
                    &lt;/pluginExecutions>
                &lt;/lifecycleMappingMetadata>
            &lt;/configuration>
        &lt;/plugin>
    &lt;/plugins>
&lt;/pluginManagement>

2.2 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

pom.xml (partial)

1
2
3
4
5
6
7
8
9
10
11
12
13
&lt;pluginExecution>
    &lt;pluginExecutionFilter>
        &lt;groupId>org.jvnet.jax-ws-commons&lt;/groupId>
        &lt;artifactId>jaxws-maven-plugin&lt;/artifactId>
        &lt;goals>
            &lt;goal>wsimport&lt;/goal>
        &lt;/goals>
        &lt;versionRange>[0.0,)&lt;/versionRange>
    &lt;/pluginExecutionFilter>
    &lt;action>
        &lt;ignore />
    &lt;/action>
&lt;/pluginExecution>

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

3. Useful Eclipse IDE shortcuts :

Related Articles:

References:

Happy Coding !!
Happy Learning !!

Eclipse + Maven - How to import Maven project with pom.xml ?
Eclipse + Maven - mvn eclipse:eclipse command