I am trying to use the solution described here to solve the annoying "Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.7:add-source (execution: default, phase: generate-sources)" when I place the following plugin on my pom.xml:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals><goal>add-source</goal></goals>
<configuration>
<sources>
<source>src/bootstrap/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
But when I run mvn clean install I get this:
Reason: POM 'org.eclipse.m2e:lifecycle-mapping' not found in repository: Unable to download the artifact from any repository
Does anyone have a clue on how to make m2e and maven happy?
The
org.eclipse.m2e:lifecycle-mapping
plugin doesn't exist actually. It should be used from the<build><pluginManagement>
section of yourpom.xml
. That way, it's not resolved by Maven but can be read by m2e.But a more practical solution to your problem would be to install the m2e build-helper connector in eclipse. You can install it from the
Window
>Preferences
>Maven
>Discovery
>Open Catalog
. That waybuild-helper-maven-plugin:add-sources
would be called in eclipse without having you to change yourpom.xml
.I was having the same issue, where:
No marketplace entries found to handle build-helper-maven-plugin:1.8:add-source in Eclipse. Please see Help for more information.
and clicking the Window > Preferences > Maven > Discovery > open catalog button would report no connection.
Updating from 7u40 to 7u45 on Centos 6.4 and OSX fixes the issue.
I have opened a (trivial) bug for this at m2e. Vote for it if you want the warning message to be gone for good...
https://bugs.eclipse.org/bugs/show_bug.cgi?id=367870
m2e 1.7 introduces a new syntax for lifecycle mapping metadata that doesn't cause this warning anymore:
Try using the
build/pluginManagement
section, e.g. :Here's an example to generate bundle manifest during incremental compilation inside Eclipse :
versionRange is required, if omitted m2e (as of 1.1.0) will throw NullPointerException.
You can use this dummy plugin:
After generating the project install/deploy it.