1

I have crated maven project in eclipse to compile xstream library for java 1.4. Currently I have several errors shown below.

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.5:maven-version (execution: versions, phase: initialize)

What is that?

maven-resources-plugin prior to 2.4 is not supported by m2e. Use maven-resources-plugin version 2.4 or later.

Where to get this plugin?

And several other errors similar to firs one:

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.5:parse-version (execution: versions, phase: initialize)

Plugin execution not covered by lifecycle configuration: org.apache.felix:maven-bundle-plugin:2.3.7:manifest (execution: bundle-manifest, phase: process-classes)

enter image description here

How to solve these problems?

Subodh Joshi
  • 12,717
  • 29
  • 108
  • 202
vico
  • 17,051
  • 45
  • 159
  • 315
  • It seems that Eclipse that you are using doesn't support that old Maven project. You can try with an older version of Eclipse, or better use Maven from the command line – Raffaele Aug 25 '15 at 11:40
  • Select all Projects and "Right click"->Maven->Update Project Configuration - Select all Projects and in Menu -> Project -> Clear ...FOR FIRST ERROR YOU CAN CHECK http://stackoverflow.com/questions/6827836/error-in-pom-xml/6830307#6830307 – Subodh Joshi Aug 25 '15 at 11:43
  • after ""Right click"->Maven->Upd..." i got one error: Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-dependency-plugin:2.1:copy (execution: complete-test-classpath, phase: process-test-resources) – vico Aug 25 '15 at 12:04
  • "FOR FIRST ERROR YOU CAN CHECK " - as far as I understood it is better to import Maven project. After I did this I have no problem at all. But where project places its build jar file? And how to define required java version? – vico Aug 25 '15 at 12:06

1 Answers1

2

This is caused because Maven and Eclipse are two different building tools, sometimes resembling and sometimes disjoint. So, the M2 plugin is supposed to adapt the POM's contents to the building lifecycle of Eclipse. However, as Maven's building lifecycle is much more complete than Eclipse's, M2 is not always able to do such an adaptation, and in these cases it raises the error you are asking about.

Usually, you should not worry a lot about this, because the project will eventually be built by Maven, so the important thing is the POM be 100% understood by Maven, not Eclipse. We use Eclipse mostly for the automatic building, not for producing the final JAR.

Anyway, you can drop these errors through three alternative options (available in the very screenshots you have posted):

  • Discover new M2 connectors: I do not recommend this, if you are using the latest M2 version. You can give it a try once, if you want.

The other two options are both aimed to instruct Eclipse to ignore the reported plugins:

  • Permanently mark goal X in pom.xml as ignored: It adds an extra declaration to the POM marking that plugin as ignorable by Eclipse.
  • Mark goal X as ignored in Eclipse build: It leaves the POM unmodified, but adds that info to the current Eclipse workspace metadata, so it will be applied to all POMs (present and future) in the same workspace.
Little Santi
  • 8,563
  • 2
  • 18
  • 46
  • Nice answer for the complex [background](https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html) – FrVaBe Aug 25 '15 at 12:25