When you open your AspectJ project in Eclipse with the m2eclipse, the following error may appear.
- Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin…
This is because m2e doesn’t provide lifecycle mapping for aspectj-maven-plugin. A work around is to add the following <pluginManagement> setting in the pom.xml.
... <build> <pluginManagement> <!-- Fix AspectJ lifecycle error in eclipes --> <plugins> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId> <versionRange>[1.0,)</versionRange> <goals> <goal>test-compile</goal> <goal>compile</goal> </goals> </pluginExecutionFilter> <action> <execute /> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> <!-- Other config --> <build> ...
This solution applies to any Maven plugins, ex. the svn-revision-number-maven-plugin, which throw the Plugin execution not covered by lifecycle configuration error.
Done =)
Reference: StackOverflow – aspectj not recognized in Maven plugin