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/ratis.git


The following commit(s) were added to refs/heads/master by this push:
     new e74f54821 RATIS-2362. Use maven.compiler.release for target Java 
version (#1317)
e74f54821 is described below

commit e74f54821b77111c71b64c45ff71686423892020
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Wed Nov 19 07:02:51 2025 +0100

    RATIS-2362. Use maven.compiler.release for target Java version (#1317)
---
 pom.xml | 66 +++++------------------------------------------------------------
 1 file changed, 5 insertions(+), 61 deletions(-)

diff --git a/pom.xml b/pom.xml
index 718a1a3e2..b702cbcd3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -177,10 +177,9 @@
     <shell-executable>bash</shell-executable>
 
     <!-- define the Java language version used by the compiler -->
-    <javac.version>8</javac.version>
-    <java.min.version>${javac.version}</java.min.version>
-    <maven.compiler.release>${javac.version}</maven.compiler.release>
-    <maven.min.version>3.3.9</maven.min.version>
+    <maven.compiler.release>8</maven.compiler.release>
+    <!-- override maven.compiler.target=8 defined in parent POM 35; can be 
removed on upgrade to 36+ -->
+    <maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
 
     <!-- Contains all shaded thirdparty dependencies -->
     <ratis.thirdparty.version>1.0.10</ratis.thirdparty.version>
@@ -470,16 +469,6 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-enforcer-plugin</artifactId>
-          <configuration>
-            <rules>
-              <requireMavenVersion>
-                <version>[${maven.min.version},)</version>
-              </requireMavenVersion>
-              <requireJavaVersion>
-                <version>[${java.min.version},)</version>
-              </requireJavaVersion>
-            </rules>
-          </configuration>
           <dependencies>
             <dependency>
               <groupId>de.skuzzle.enforcer</groupId>
@@ -654,49 +643,6 @@
         <groupId>com.github.spotbugs</groupId>
         <artifactId>spotbugs-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-enforcer-plugin</artifactId>
-        <inherited>false</inherited>
-        <executions>
-          <execution>
-            <id>clean</id>
-            <goals>
-              <goal>enforce</goal>
-            </goals>
-            <phase>pre-clean</phase>
-          </execution>
-          <execution>
-            <id>default</id>
-            <goals>
-              <goal>enforce</goal>
-            </goals>
-            <phase>validate</phase>
-            <configuration>
-              <rules>
-                <!-- The earliest maven version we verify builds for via ASF 
Jenkins -->
-                <requireMavenVersion>
-                  <version>[${maven.min.version},)</version>
-                  <message>Maven is out of date.
-                    Ratis requires at least version ${maven.min.version} of 
Maven to properly build from source.
-                    You appear to be using an older version. You can use 
either "mvn -version" or
-                    "mvn enforcer:display-info" to verify what version is 
active.
-                  </message>
-                </requireMavenVersion>
-                <!-- The earliest JVM version we verify builds for via ASF 
Jenkins -->
-                <requireJavaVersion>
-                  <version>[${java.min.version},)</version>
-                  <message>Java is out of date.
-                    Ratis requires at least version ${java.min.version} of the 
JDK to properly build from source.
-                    You appear to be using an older version. You can use 
either "mvn -version" or
-                    "mvn enforcer:display-info" to verify what version is 
active.
-                  </message>
-                </requireJavaVersion>
-              </rules>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
@@ -919,13 +865,11 @@
                 <configuration>
                   <rules>
                     <enforceBytecodeVersion>
-                      <maxJdkVersion>${java.min.version}</maxJdkVersion>
+                      <maxJdkVersion>${maven.compiler.release}</maxJdkVersion>
                       <message>Ratis has unsupported dependencies.
-                        Ratis requires that all dependencies be compiled with 
version ${java.min.version} or earlier
+                        Ratis requires that all dependencies be compiled with 
version ${maven.compiler.release} or earlier
                         of the JDK to properly build from source.  You appear 
to be using a newer dependency. You can use
                         either "mvn -version" or "mvn enforcer:display-info" 
to verify what version is active.
-                        Non-release builds can temporarily build with a newer 
JDK version by setting the
-                        'javac.source' property (eg. mvn -Djavac.source=1.8 
clean package).
                       </message>
                     </enforceBytecodeVersion>
                   </rules>

Reply via email to