From 988b3b2cb61f2a8146cf4906ba5337977a07a69e Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Thu, 21 Dec 2023 08:40:39 +0700 Subject: [PATCH] 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. --- spring-data-jpa/pom.xml | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index b39293042a..6889823431 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -356,6 +356,13 @@ + + maven-compiler-plugin + + only + + + org.codehaus.mojo aspectj-maven-plugin @@ -369,32 +376,37 @@ + aspectj-compile compile process-classes + + + + + aspectj-test-compile + + test-compile + + process-test-classes + + + + none + + true true - - true + true org.springframework spring-aspects - - **/domain/support/AuditingEntityListener.java - ${source.level} ${source.level} ${source.level}