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

cnauroth pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new b3ce394e5ab HADOOP-19779: Use enforcer to fail fast if building with 
Java <17
b3ce394e5ab is described below

commit b3ce394e5aba3cdaf326b87e7cfb6be898ddd48d
Author: Chris Nauroth <[email protected]>
AuthorDate: Mon Jan 12 18:32:17 2026 +0000

    HADOOP-19779: Use enforcer to fail fast if building with Java <17
    
    Closes #8173
    
    Signed-off-by: Akira Ajisaka <[email protected]>
    Signed-off-by: Steve Loughran <[email protected]>
    Reviewed-by: Edward Guy Capriolo <[email protected]>
---
 hadoop-project/pom.xml | 11 -----------
 pom.xml                | 15 +++++++++++++--
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml
index e84951afe92..d902fd489ed 100644
--- a/hadoop-project/pom.xml
+++ b/hadoop-project/pom.xml
@@ -165,17 +165,6 @@
     <grpc.version>1.10.0</grpc.version>
     <os-maven-plugin.version>1.7.1</os-maven-plugin.version>
 
-    <!-- define the Java language version used by the compiler -->
-    <javac.version>1.8</javac.version>
-
-    <!-- The java version enforced by the maven enforcer -->
-    <!-- more complex patterns can be used here, such as
-       [${javac.version})
-    for an open-ended enforcement
-    -->
-    <enforced.java.version>[${javac.version},)</enforced.java.version>
-    <enforced.maven.version>[3.3.0,)</enforced.maven.version>
-
     <!-- keep this list sync with
          
hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh#hadoop_finalize_jpms_opts
     -->
diff --git a/pom.xml b/pom.xml
index 69fc7ed5ec4..8a4688a74a3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -137,6 +137,17 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/x
      running all unit tests before the it.test option is picked up.
     -->
     <surefire.failIfNoSpecifiedTests>false</surefire.failIfNoSpecifiedTests>
+
+    <!-- define the Java language version used by the compiler -->
+    <javac.version>17</javac.version>
+
+    <!-- The java version enforced by the maven enforcer -->
+    <!-- more complex patterns can be used here, such as
+       [${javac.version})
+    for an open-ended enforcement
+    -->
+    <enforced.java.version>[${javac.version},)</enforced.java.version>
+    <enforced.maven.version>[3.3.0,)</enforced.maven.version>
   </properties>
 
   <modules>
@@ -176,10 +187,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/x
           <configuration>
             <rules>
               <requireMavenVersion>
-                <version>[3.0.2,)</version>
+                <version>${enforced.maven.version}</version>
               </requireMavenVersion>
               <requireJavaVersion>
-                <version>[1.8,)</version>
+                <version>${enforced.java.version}</version>
               </requireJavaVersion>
             </rules>
           </configuration>


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

Reply via email to