I have a maven java project (deploying to jboss, if that matters) that uses the maven-jar-plugin. This works fine using Eclipse Kepler. I'm now trying Luna (EE edition), and I'm now getting this error
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-jar-plugin:2.5:jar (execution: make-a-jar, phase: compile)
in all my child .pom files (the maven-jar-plugin is specified in the parent .pom file, but the error points to the block in the child .poms).
In the .pom viewer, if I click on the error message in the Overview tab, it gives me the option to "Discover new m2e connectors". Clicking on this brings up the "m2e Marketplace" dialog and appears to do a bunch of work, but then just shows me an empty list. If I click "Finish", it tries to calculate dependencies, and then gives me this error:
Operation details
Cannot complete the request. See the error log for details.
"m2e connector for mavenarchiver pom properties" will be ignored because a newer version is already installed.
So it appears to be that maybe the maven-jar-plugin depends on a particular version of mavenarchiver, but Eclipse Luna EE comes with a newer version. Is there a way to fix this problem, or do I just have to wait for a newer version of maven-jar-plugin to be released? (I'm currently using version 2.5 of maven-jar-plugin, which is the latest that I'm aware of.)
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?
Plugin executions are ordered according to their phases.
From Maven documentation: pluginManagement: is an element that is seen along side plugins. Plugin Management contains plugin elements in much the same way, except that rather than configuring plugin information for this particular project build, it is intended to configure project builds that inherit from this one.
I had a similar problem when trying to import Hadoop project in Eclipse. The solution above works... but I got "tired" of changing some of the pom files, and thought that the change would bite me later. So, another solution is: To avoid the messages in Eclipse regarding execution not covered by lifecycle, go to Windows -> Preferences -> Maven -> Errors/Warning and select Ignore for "Plugin execution not covered for Lifecycle.."
You can solve the problem when you change the phase of execution from compile to package (which is default lifecycle phase for jar goal).
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin}</version>
<executions>
<execution>
<phase>package</phase> <!-- changed from compile to package -->
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
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