我正在尝试与 Spring Data and Neo4j 合作。我首先尝试关注 this guide由主站点链接。特别是我的 pom.xml 基于 "Hello, World!" example file 。这是我的 pom.xml 中导致问题的插件的片段...
<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>
我看到的错误是:
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)
我正在运行 Eclipse 3.6.2 和 m2e 0.13。我不是 Maven 专家,因此如果可能的话,请在您的答案中提供详细的解释。
我也尝试过m2e 1.0.0通过 this update site仍然得到同样的错误。
最佳答案
在我遇到类似问题的情况下,我没有使用 Andrew 的建议来进行修复,而是在我向相关 pom.xml 引入
<build>
<pluginManagement>
<plugins>
<plugin> ... </plugin>
<plugin> ... </plugin>
....
</plugins>
</pluginManagement>
</build>
一旦该结构就位,错误就会消失。
关于eclipse - 如何解决 Spring Data Maven 构建的 "Plugin execution not covered by lifecycle configuration",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33390377/