score:72

Accepted answer

my team works around this problem by wrapping the relevant configuration in a profile:

<profile>
  <id>only-eclipse</id>
  <activation>
    <property>
      <name>m2e.version</name>
    </property>
  </activation>
  <build>
    <pluginmanagement>
      <plugins>
        <plugin>
          <groupid>org.eclipse.m2e</groupid>
          <artifactid>lifecycle-mapping</artifactid>
          <version>1.0.0</version>
          <configuration>
            ...
          </configuration>
        </plugin>
      </plugins>
    </pluginmanagement>
  </build>
</profile>

score:0

now there's now better solution (for the error messages in eclipse only).

press ctr+1 on the error plugin execution not covered by lifecycle configuration: org.codehaus.mojo:buildnumber-maven-plugin:1.1:create-timestamp (execution: default-create-timestamp, phase: validate) and then select this option:

enter image description here

this works with org.eclipse.m2e.editor.xml_1.2.0.20120903-1050.jar plugin (maybe earlier also)

score:8

this solution is now deprecated, i would recommend using the "profile" solution by @ctrueden which is the accepted answer!

while not the most clean solution, when you use a repository manager in your company or are on your own, in the mean time you may do this: - checkout https://github.com/mfriedenhagen/dummy-lifecycle-mapping-plugin. - run mvn install when you are on your own - run mvn deploy -daltdeploymentrepository=repo_id::default::your_thirdparty_repo_url when you have a repository manager like nexus or artifactory. - see https://github.com/mfriedenhagen/dummy-lifecycle-mapping-plugin/blob/master/readme.creole as well.

regards mirko

score:17

m2eclipse 1.7.0 introduced an alternative, namely an xml processing instruction.

in the original example, you would simply “annotate” every <execution> of the maven-processor-plugin’s process goal with

<?m2e execute?>

see the release notes for more details on the syntax and further options.

score:20

this a known bug with wontfix resolution. the suggested solution is the simplest in my opinion:

mvn archetype:generate -dgroupid=org.eclipse.m2e -dartifactid=lifecycle-mapping \
 -dversion=1.0.0 -darchetypeartifactid=maven-archetype-mojo

and install this project.


Related Query

More Query from same tag