This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new a00f6bd08f1 HDDS-13656. Fix aspectj settings for Java 11+ (#9010)
a00f6bd08f1 is described below

commit a00f6bd08f1b4c1dbe6e3bf081c148f4b0dfba61
Author: Symious <[email protected]>
AuthorDate: Wed Sep 17 14:39:57 2025 +0800

    HDDS-13656. Fix aspectj settings for Java 11+ (#9010)
---
 hadoop-ozone/ozone-manager/pom.xml | 13 ++++++++++---
 pom.xml                            | 20 +++++++++++---------
 2 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/hadoop-ozone/ozone-manager/pom.xml 
b/hadoop-ozone/ozone-manager/pom.xml
index c9c2f991b5f..cdbffa65f19 100644
--- a/hadoop-ozone/ozone-manager/pom.xml
+++ b/hadoop-ozone/ozone-manager/pom.xml
@@ -380,17 +380,24 @@
         <groupId>dev.aspectj</groupId>
         <artifactId>aspectj-maven-plugin</artifactId>
         <configuration>
-          <source>1.8</source>
-          <target>1.8</target>
+          <source>${maven.compiler.release}</source>
+          <target>${maven.compiler.release}</target>
           
<argumentFileDirectory>${project.build.directory}/aspectj-build</argumentFileDirectory>
         </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjtools</artifactId>
+            <version>${aspectj.version}</version>
+          </dependency>
+        </dependencies>
         <executions>
           <execution>
             <goals>
               <goal>compile</goal>
             </goals>
             <configuration>
-              <complianceLevel>1.8</complianceLevel>
+              <complianceLevel>${maven.compiler.release}</complianceLevel>
             </configuration>
           </execution>
         </executions>
diff --git a/pom.xml b/pom.xml
index 292d52a257b..b51c4176f40 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,6 +33,9 @@
     <aopalliance.version>1.0</aopalliance.version>
     <apache-rat-plugin.version>0.16.1</apache-rat-plugin.version>
     <aspectj-plugin.version>1.14.1</aspectj-plugin.version>
+    <aspectj.java11.version>1.9.20</aspectj.java11.version>
+    <aspectj.java21.version>1.9.24</aspectj.java21.version>
+    <!-- Default aspectj version for java8 -->
     <aspectj.version>1.9.7</aspectj.version>
     <assertj.version>3.27.4</assertj.version>
     <aws-java-sdk.version>1.12.788</aws-java-sdk.version>
@@ -163,6 +166,7 @@
     
<maven-surefire-report-plugin.version>${maven-surefire-plugin.version}</maven-surefire-report-plugin.version>
     <maven-war-plugin.version>3.4.0</maven-war-plugin.version>
     
<maven.compiler.createMissingPackageInfoClass>false</maven.compiler.createMissingPackageInfoClass>
+    <maven.compiler.release>${javac.version}</maven.compiler.release>
     <maven.core.version>3.9.10</maven.core.version>
     
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
     <metainf-services.version>1.11</metainf-services.version>
@@ -2681,25 +2685,23 @@
         </plugins>
       </build>
     </profile>
-    <!-- Profiles for specific JDK versions -->
+    <!-- Profiles for specific aspectj versions -->
     <profile>
-      <id>java8</id>
+      <id>aspectj-java11-20</id>
       <activation>
-        <jdk>[,8]</jdk>
+        <jdk>[11,20]</jdk>
       </activation>
       <properties>
-        <maven.compiler.source>${javac.version}</maven.compiler.source>
-        <maven.compiler.target>${javac.version}</maven.compiler.target>
+        <aspectj.version>${aspectj.java11.version}</aspectj.version>
       </properties>
     </profile>
     <profile>
-      <id>java9-or-later</id>
+      <id>aspectj-java21-or-later</id>
       <activation>
-        <jdk>[9,]</jdk>
+        <jdk>[21,]</jdk>
       </activation>
       <properties>
-        <!-- supported since Java 9 -->
-        <maven.compiler.release>${javac.version}</maven.compiler.release>
+        <aspectj.version>${aspectj.java21.version}</aspectj.version>
       </properties>
     </profile>
     <profile>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to