Skip to content

Commit 24c8b77

Browse files
kriegaexmp911de
authored andcommitted
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 mojohaus/aspectj-maven-plugin#15. See #3282
1 parent 7d7274a commit 24c8b77

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

spring-data-jpa/pom.xml

+24-12
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,13 @@
356356
</configuration>
357357
</plugin>
358358

359+
<plugin>
360+
<artifactId>maven-compiler-plugin</artifactId>
361+
<configuration>
362+
<proc>only</proc>
363+
</configuration>
364+
</plugin>
365+
359366
<plugin>
360367
<groupId>org.codehaus.mojo</groupId>
361368
<artifactId>aspectj-maven-plugin</artifactId>
@@ -369,32 +376,37 @@
369376
</dependencies>
370377
<executions>
371378
<execution>
379+
<id>aspectj-compile</id>
372380
<goals>
373381
<goal>compile</goal>
374382
</goals>
375383
<phase>process-classes</phase>
384+
<configuration>
385+
</configuration>
386+
</execution>
387+
<execution>
388+
<id>aspectj-test-compile</id>
389+
<goals>
390+
<goal>test-compile</goal>
391+
</goals>
392+
<phase>process-test-classes</phase>
393+
<configuration>
394+
</configuration>
376395
</execution>
377396
</executions>
378397
<configuration>
398+
<!-- Annotation processing is done by Maven Compiler (hard to configure for AJ Maven) -->
399+
<proc>none</proc>
400+
<!-- Generate metadata for reflection on method parameters -->
401+
<parameters>true</parameters>
379402
<verbose>true</verbose>
380-
<!--
381-
To workaround:
382-
383-
- https://issues.apache.org/jira/browse/MCOMPILER-205
384-
- https://issues.apache.org/jira/browse/MCOMPILER-209
385-
- https://github.com/mojohaus/aspectj-maven-plugin/issues/15
386-
387-
-->
388-
<forceAjcCompile>true</forceAjcCompile>
403+
<showWeaveInfo>true</showWeaveInfo>
389404
<aspectLibraries>
390405
<aspectLibrary>
391406
<groupId>org.springframework</groupId>
392407
<artifactId>spring-aspects</artifactId>
393408
</aspectLibrary>
394409
</aspectLibraries>
395-
<includes>
396-
<include>**/domain/support/AuditingEntityListener.java</include>
397-
</includes>
398410
<complianceLevel>${source.level}</complianceLevel>
399411
<source>${source.level}</source>
400412
<target>${source.level}</target>

0 commit comments

Comments
 (0)