The org.eclipse.m2e:lifecycle-mapping
plugin doesn’t exist actually. It should be used from the <build><pluginManagement>
section of your pom.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 way build-helper-maven-plugin:add-sources
would be called in eclipse without having you to change your pom.xml
.