I have jaxws-maven-plugin in parent pom.xml in the pluginManagement tag and I am referring to this plugin in the child pom.
mvn clean install is running fine. But, eclipse is complaining that "Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:jaxws-maven-plugin:1.12:wsimport (execution: FirstWsdl, phase: generate-sources)".
Could you suggest how to avoid this error in eclipse?
parent pom
<pluginManagement>
<plugins>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>FirstWsdl</id>
<goals>
<goal>wsimport</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<wsdlLocation>location/file.wsdl</wsdlLocation>
<wsdlFiles>
<wsdlFile>file.wsdl</wsdlFile>
</wsdlFiles>
<packageName>com.xxx.package</packageName>
</configuration>
</execution>
</executions>
<configuration>
<sourceDestDir>${basedir}/generated</sourceDestDir>
<verbose>true</verbose>
<extension>true</extension>
<keep>true</keep>
<vmArgs>
<vmArg .../>
</vmArgs>
</configuration>
</plugin>
...
</plugins>
</pluginManagement>
child pom
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
</plugin>
</plugins>
I looked at this question and reply How to solve "Plugin execution not covered by lifecycle configuration" for Spring Data Maven Builds, but, should I use pluginManagement both in parent and child pom to avoid this error?
Just go to Window->Preferences->Maven->Errors/Warnings and change the warning level for the last element "Plugin execution not covered by lifecycle configuration" to either warning or ignore. What whay do you recommend to run a module when using eclipse+debugging?
Maven exec plugin allows us to execute system and Java programs from the maven command. There are two goals of the maven exec plugin: exec:exec - can be used to execute any program in a separate process. exec:java - can be used to run a Java program in the same VM.
If you can't find connectior you can turn off this error in eclipse because as a documentation says:
To get the Maven execution from within Eclispe to work you don't have to do anything.
so go to Eclipse: Preferences -> Maven -> Error/Warnings
and change Error to Warning in option: Plugin execution not converted by lifecycle configuration
This should be:
documented in the wiki page "M2E plugin execution not covered":
Project build lifecycle mapping can be configured in a project's
pom.xml
, contributed by Eclipse plugins, or defaulted to the commonly used Maven plugins shipped with m2e.
We call these "lifecycle mapping metadata sources".
m2e will create error marker like below for all plugin executions that do not have lifecycle mapping in any of the mapping metadata sources.
illustrated in "How to solve “Plugin execution not covered by lifecycle configuration” for Spring Data Maven Builds" (that you reference).
<pluginManagement>
tag (in both pom). That thread adds more details to your specific error message:
when taking a look in the Eclipse-UI in the project properties under “Maven” -> “Lifecyle Mapping” (having checked the “Show lifecycle phases” checkbox and disabled “Show ignored executions”), I see the following content.
To my understanding this file shows the mapping between the Eclipse build lifecycle (runtime/incremental) and its bound Maven plugins.
Currently, it does not contain the “jax-ws
” plugin respectively its goal “wsimport
”.The problem is that you have the
jax-ws
plugin declared in thepluginManagement
section.
To get a binding to a phase it should be in build/plugins.
Performing a Maven build from CLI wouldn't work either, so I suspect that you're not doing the standard "mvn install"?To get the Maven execution from within Eclispe to work you don't have to do anything.
But if you want to have incremental/runtime support in the IDE you should get the proper m2e connector. If you look at the pom in the POM editor in Eclipse, the plugin execution should be marked with a red error X. Hover on that and you should get an option to find one ("Discover new m2e connectors").
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With