You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "cnauroth (via GitHub)" <gi...@apache.org> on 2026/01/09 00:51:37 UTC

[PR] HADOOP-19779: Use enforcer to fail fast if building with Java <17 [hadoop]

cnauroth opened a new pull request, #8173:
URL: https://github.com/apache/hadoop/pull/8173

   ### Description of PR
   
   1. Pull up the properties controlling Java version from hadoop-project/pom.xml to the root pom.xml. This is so that the same properties for Java version can be controlled across the whole project, even at points where we aren't getting inheritance from hadoop-project/pom.xml.
   1. Update the Java compiler target version and enforced range to be 17+.
   
   ### How was this patch tested?
   
   ```
   mvn clean package -DskipTests -DskipShade
   ```
   
   On Java 17, it succeeds. On Java 8, it fails fast with this error message:
   
   ```
   [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (clean) on project hadoop-main: 
   [ERROR] Rule 1: org.apache.maven.enforcer.rules.version.RequireJavaVersion failed with message:
   [ERROR] Detected JDK version 1.8.0-472 (JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.472.b08-1.el8.x86_64/jre) is not in the allowed range [17,).
   ```
   
   ### For code changes:
   
   - [X] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files?
   
   ### AI Tooling
   
   If an AI tool was used:
   
   - [ ] The PR includes the phrase "Contains content generated by <tool>"
         where <tool> is the name of the AI tool used.
   - [ ] My use of AI contributions follows the ASF legal policy
         https://www.apache.org/legal/generative-tooling.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19779: Use enforcer to fail fast if building with Java <17 [hadoop]

Posted by "cnauroth (via GitHub)" <gi...@apache.org>.
cnauroth commented on PR #8173:
URL: https://github.com/apache/hadoop/pull/8173#issuecomment-3739924205

   @edwardcapriolo , I wasn't aware of that Maven feature. Thank you for pointing it out. It looks like there would be some impact on existing contributors and build systems to set up a toolchains.xml file. I'm going to proceed with committing this patch for now, but if you want to propose a change for broader discussion in a separate JIRA issue, please go ahead.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19779: Use enforcer to fail fast if building with Java <17 [hadoop]

Posted by "cnauroth (via GitHub)" <gi...@apache.org>.
cnauroth commented on PR #8173:
URL: https://github.com/apache/hadoop/pull/8173#issuecomment-3787022164

   I committed this to trunk after reviewing results of the last CI run. Thank you for the reviews, @aajisaka , @steveloughran , @edwardcapriolo .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19779: Use enforcer to fail fast if building with Java <17 [hadoop]

Posted by "cnauroth (via GitHub)" <gi...@apache.org>.
cnauroth commented on PR #8173:
URL: https://github.com/apache/hadoop/pull/8173#issuecomment-3947877606

   @ahmarsuhail and @slfan1989 , please disregard the review request here. I actually meant to request review on #8272.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19779: Use enforcer to fail fast if building with Java <17 [hadoop]

Posted by "cnauroth (via GitHub)" <gi...@apache.org>.
cnauroth commented on PR #8173:
URL: https://github.com/apache/hadoop/pull/8173#issuecomment-3739961959

   It looks like the pre-submit runner got killed, so I triggered another run:
   
   https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8173/2/


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19779: Use enforcer to fail fast if building with Java <17 [hadoop]

Posted by "cnauroth (via GitHub)" <gi...@apache.org>.
cnauroth commented on PR #8173:
URL: https://github.com/apache/hadoop/pull/8173#issuecomment-3740033784

   Correction:
   
   https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8173/3/


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19779: Use enforcer to fail fast if building with Java <17 [hadoop]

Posted by "edwardcapriolo (via GitHub)" <gi...@apache.org>.
edwardcapriolo commented on PR #8173:
URL: https://github.com/apache/hadoop/pull/8173#issuecomment-3733929940

   Thanks for doing this. Have you also considered this approach:
   
   https://github.com/edwardcapriolo/deliverance/blob/6d7cae5463be598b7365e45a6d2773b3b2bece41/pom.xml#L103
   
   ```xml
               <plugin>
                   <groupId>org.apache.maven.plugins</groupId>
                   <artifactId>maven-compiler-plugin</artifactId>
                   <configuration>
                       <release>25</release>
                       <jdkToolchain><version>25</version></jdkToolchain>
   
                   </configuration>
               </plugin>
   
   ``` 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19779: Use enforcer to fail fast if building with Java <17 [hadoop]

Posted by "cnauroth (via GitHub)" <gi...@apache.org>.
cnauroth commented on PR #8173:
URL: https://github.com/apache/hadoop/pull/8173#issuecomment-3726593683

   Hello @sjlee . I think this would have helped make it clearer that trunk has gone to Java 17+.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19779: Use enforcer to fail fast if building with Java <17 [hadoop]

Posted by "cnauroth (via GitHub)" <gi...@apache.org>.
cnauroth closed pull request #8173: HADOOP-19779: Use enforcer to fail fast if building with Java <17
URL: https://github.com/apache/hadoop/pull/8173


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org