Java – Plugin execution not covered by lifecycle configuration error in eclipse with pluginManagement in parent pom

eclipsejavamaven

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?

Best Answer

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

Related Topic