我正在使用 aspectj-maven-plugin 以及由 appengine-maven-plugin 完成的 datanucleus 增强。如果我在 appengine-maven-plugin 之前定义了 aspectj-maven-plugin,一切似乎都可以,但是当我在 aspectj-maven-plugin 之前定义 appengine-maven-plugin 时,aspectj-maven-plugin 似乎覆盖了类增强由 appengine-maven-plugin 完成。
当然,我可以在 appengine-maven-plugin 之前定义 aspectj-maven-plugin,但我想知道是否有更好的复杂方法来解决这个问题?
这是我的配置:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
</aspectLibraries>
<outxml>true</outxml>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${org.aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${org.aspectj.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>${com.google.appengine.version}</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>enhance</goal>
</goals>
</execution>
</executions>
</plugin>