Reputation: 1465
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
Upvotes: 1
Views: 2635
Reputation: 97409
If you have the error not covered by life cycle...
you have to use the same plugin name as you really like to use in your build:
<build>
<pluginManagement>
<plugins>
<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>axistools-maven-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>wsdl2java</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Apart from that i would suggest to use an up-to-date version of the axistools-maven-plugin The reason why you have to configure this plugin is simple. Cause it's not in the life-cyclce by default. You have to bind it to the lifecylce. In this case the plugin has a default binding which will be active you give it in the pom like the above. Otherwise you have had it doing it by explicitly given that:
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
You can if you like or need configure the axistools-plugin to your needs.
Upvotes: 0
Reputation: 7207
Include "phase":
<execution>
<phase>package</phase>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
Upvotes: 2