I am trying to work with Spring Data and Neo4j. I started by trying to follow this guide linked to by the main site. In particular I based my pom.xml off of the "Hello, World!" example file. Here is a snip from my pom.xml for the plugin that is causing the issues...
<plugin>
<!-- Required to resolve aspectj-enhanced class features -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<outxml>true</outxml>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
<aspectLibrary>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
</aspectLibrary>
</aspectLibraries>
<source>1.6</source>
<target>1.6</target>
</configuration>
<executions>
<!-- ERROR HERE IN ECLIPSE SEE BELOW FOR FULL MESSAGE -->
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
The error I am seeing is:
Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.0:compile (execution: default, phase: process-classes)
- Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.0:test-compile (execution: default, phase: process-classes)
I am running Eclipse 3.6.2 and m2e 0.13. I'm not a Maven expert, so please be very explanatory in your answers if possible.
I've also tried m2e 1.0.0 via this update site and still get the same error.
Goto
workspace/rtc-ws/.metadata/.plugins/org.eclipse.m2e.core/lifecycle-mapping-metadata.xml
then createlifecycle-mapping-metadata.xml
file and paste below and reload configuration as belowIf you are using Eclipse 4.2 and have troubles with mapping and won't put mess into yours
pom.xml
create new filelifecycle-mapping-metadata.xml
configure it inWindows -> Preferences -> Lifecycle mapping
(don't forget press Reload workspace lifecycle mappings metadata after each change of this file!). Here is example based oneclipse/plugins/org.eclipse.m2e.lifecyclemapping.defaults_1.2.0.20120903-1050.jar/lifecycle-mapping-metadata.xml
you can suppress this error in eclipse: Window -> Preferences -> Maven -> Error/Warnings
I was using
and changed it to
and the error went away. Maybe it's not recommended to bind an execution to the test-compile phase so finding a different phase might be an alternate solution to adding plugin-management configuration to the maven lifecycle.
Note that the M2Eclipse (m2e) version 1.7.0 available in today's Eclipse Neon release train supports new syntax for specifying lifecycle mapping metadata. As a result boilerplate like this (here we're telling m2e to ignore the goal):
can be replaced with a single line in the plugin's execution node:
See the release notes for details.
Instead of messing up your pom file, I would suggest you to go to Show View → Markers in Eclipse, select and delete the markers of appropriate errors.
I had the same problem with Eclipse v3.7 (Indigo) and m2eclipse as my Maven plugin. The error was easily solved by explicitly stating the execution phase within the plugin definition. So my pom looks like this: