I was recently forced to update my Eclipse installation to version 3.7 (Indigo). After opening some old projects, I got the following error message:
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.5:add-source (execution: add-source, phase: generate-sources) ... Maven Project Build Lifecycle Mapping Problem
The “build-helper-maven-plugin” simply adds a second source folder:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/src-gen/main/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
However, with Indigo and M2Eclipse, the source folder was no longer added, and I got compile errors all over the place…
It took me some time to figure out the right solution:
Just install the “M2Extras / buildhelper” plugin!
You can download it here (Eclipse Update Site):
https://repository.sonatype.org/content/repositories/forge-sites/m2e-extras/0.14.0/N/0.14.0.201109282148/
(The exact directory may vary depending on you exact Eclipse version and the latest available M2Extras release)