问题描述
我正在尝试使用。我开始尝试按照主站点链接的。特别是我基于我的pom.xml关于。这是一个来自我的pom.xml中的一个snip,用于导致问题的插件...
<插件>
<! - 需要解决aspectj增强的类功能 - >
< 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>
<执行>
<! - 这里的ECLIPSE中的错误可以看到下面的全部消息 - >
< execution>
< goals>
< goal> compile< / goal>
< goal> test-compile< / goal>
< / goals>
< / execution>
< / executions>
<依赖关系>
<依赖关系>
< groupId> org.aspectj< / groupId>
< artifactId> aspectjrt< / artifactId>
< version> $ {aspectj.version}< / version>
< / dependency>
<依赖关系>
< groupId> org.aspectj< / groupId>
< artifactId> aspectjtools< / artifactId>
< version> $ {aspectj.version}< / version>
< / dependency>
< / dependencies>
< / plugin>
我看到的错误是:
在此行发现的多个注释:
- 生命周期配置未涵盖的插件执行:org.codehaus.mojo:aspectj-maven-plugin:1.0:compile(execution:阶段:进程类)
- 生命周期配置未涵盖的插件执行:org.codehaus.mojo:aspectj-maven-plugin:1.0:test-compile(执行:默认,阶段:进程类)$ b $我正在运行Eclipse 3.6.2和m2e 0.13。我不是一个Maven专家,所以请尽可能的解释你的答案。
我现在也尝试了通过,仍然得到相同的错误。
解决方案我不记得我在哪里找到了,但是我不得不添加以下内容来让M2Eclipse快乐。更难的是,这不是很容易理解为什么需要这个标签。
<建立>
...各种插件...
< pluginManagement>
< plugins>
<! - 此插件的配置仅用于存储Eclipse
m2e设置。它对Maven构建本身没有影响。 - >
< plugin>
< groupId> org.eclipse.m2e< / groupId>
< artifactId>生命周期映射< / 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>
< / build>
M2Eclipse插件中还有一些其他问题根本不适用于Spring数据。最后我禁用了M2Eclipse,支持。
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 have now also tried m2e 1.0.0 via this update site and still get the same error.
解决方案 What a mess. I don't remember where I found this but I had to add the following to get M2Eclipse to be happy. Even more sad is that it isn't exactly easy to understand why this tag is needed.
<build>
... various plugins ...
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse
m2e settings only. It has no influence on the Maven build itself. -->
<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>
</build>
There were a number of other issues with the M2Eclipse plug-in that simply didn't work with Spring Data. In the end I disabled M2Eclipse in favor of the Apache Eclipse plug-in.
这篇关于如何解决“不被生命周期配置覆盖的插件执行”为Spring Data Maven构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!