Get rid of 'forceAjcCompile' workaround and special includes.
by separation of concerns: Let
- Maven Compiler do annotation processing without compilation and
- AspectJ Maven compilation of all Java sources and aspects without
annotation processing.
Actually, we could let AJ Maven do all the work, but it would be
difficult to configure everything correctly in JDK 9+, because AJ Maven
is incomplete regarding automatically putting everything on the right
module paths. so, this separation of concerns saves tedious
configuration work.
Relates to https://github.com/mojohaus/aspectj-maven-plugin/issues/15.
See #3282
This commit is contained in:
committed by
Mark Paluch
parent
40c5f44161
commit
4b1ea8c5df
@@ -356,6 +356,13 @@
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<proc>only</proc>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>aspectj-maven-plugin</artifactId>
|
||||
@@ -369,32 +376,37 @@
|
||||
</dependencies>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>aspectj-compile</id>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<phase>process-classes</phase>
|
||||
<configuration>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>aspectj-test-compile</id>
|
||||
<goals>
|
||||
<goal>test-compile</goal>
|
||||
</goals>
|
||||
<phase>process-test-classes</phase>
|
||||
<configuration>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<!-- Annotation processing is done by Maven Compiler (hard to configure for AJ Maven) -->
|
||||
<proc>none</proc>
|
||||
<!-- Generate metadata for reflection on method parameters -->
|
||||
<parameters>true</parameters>
|
||||
<verbose>true</verbose>
|
||||
<!--
|
||||
To workaround:
|
||||
|
||||
- https://issues.apache.org/jira/browse/MCOMPILER-205
|
||||
- https://issues.apache.org/jira/browse/MCOMPILER-209
|
||||
- https://github.com/mojohaus/aspectj-maven-plugin/issues/15
|
||||
|
||||
-->
|
||||
<forceAjcCompile>true</forceAjcCompile>
|
||||
<showWeaveInfo>true</showWeaveInfo>
|
||||
<aspectLibraries>
|
||||
<aspectLibrary>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aspects</artifactId>
|
||||
</aspectLibrary>
|
||||
</aspectLibraries>
|
||||
<includes>
|
||||
<include>**/domain/support/AuditingEntityListener.java</include>
|
||||
</includes>
|
||||
<complianceLevel>${source.level}</complianceLevel>
|
||||
<source>${source.level}</source>
|
||||
<target>${source.level}</target>
|
||||
|
||||
Reference in New Issue
Block a user