Search code examples
javaeclipsemavenm2eclipse

Maven plugin execution not covered - again


I am getting kind of frustrated with this issue. I have this plugin inside my pom.xml

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>axistools-maven-plugin</artifactId>
  <version>1.3</version>
  <executions>
    <execution>
     <goals>
      <goal>wsdl2java</goal>
     </goals>
    </execution>
  </executions>
  ...

And I am getting always this eclipse message plugin configuration not covered by maven lifecycle

This error is getting anoying. I found out that if i move this one into pluginConfiguration the error is gone, but that is due it isn't called anymore because its for inheritance maven structures.

If I remove the execution elements, eclipse is happy again, but it is not called anymore.

So I tried to add this huge plugin configuration (lifecycle-mapping) where I have no idea what it is about, but it didn't help at all:

<plugin>
   <groupId>org.eclipse.m2e</groupId>
   <artifactId>lifecycle-mapping</artifactId>
   <version>1.0.0</version>
   <configuration>
      <lifecycleMappingMetadata>
          <pluginExecutions>
              <pluginExecution>
                   <pluginExecutionFilter>
                       <groupId>org.codehaus.mojo</groupId>
                       <artifactId>aspectj-maven-plugin</artifactId>
                       <versionRange>[1.0,)</versionRange>
                       <goals>
                          <goal>test-compile</goal>
                          <goal>compile</goal>
                       </goals>
                   </pluginExecutionFilter>
                   <action>
                       <execute />
                   </action>
               </pluginExecution>
           </pluginExecutions>
       </lifecycleMappingMetadata>
   </configuration>
</plugin>       

I was able to build this project inside eclipse without errors, but it always displays the execution tag as error and during importing existing maven project I get also an error.

I deleted the error in eclipse :-) That worked fine, but next time the error will appear again. If I google that issue I will find so many topics about that so why is that not fixed yet?

I also read this article http://wiki.eclipse.org/M2E_plugin_execution_not_covered
but hornestly if that is the solution I think maven and eclipse don't fit together.

What I also don't get, why do I have to tell maven when to execute this plugin? I don't need to tell maven on each plugin when to execute. Why on this one? Can I configure that in a different way?

Thanks for help and many greetings, Hauke


Solution

  • Include "phase":

    <execution>
    <phase>package</phase>
     <goals>
      <goal>wsdl2java</goal>
     </goals>
    </execution>