HADOOP-19790. Set Minimum Required Maven Version to 3.9.11#8214
HADOOP-19790. Set Minimum Required Maven Version to 3.9.11#8214steveloughran merged 10 commits intoapache:trunkfrom
Conversation
|
Here is a small patch for changing the min required maven version. Also please let me know if any additional testig is needed. |
This comment was marked as outdated.
This comment was marked as outdated.
|
the current dev container uses 3.9.9, and building docs guides to use maven 3.3+, please search and udpate it everywhere for consistency 3.9.9+ might be good enough if you want to minimize the change (avoid touching Dockerfiles, but only building docs) update: I have wrong memory, it should be 3.9.11 |
| $ sudo apt-get -y install maven | ||
|
|
||
| Note: Above command might not the required Maven version i.e.3.9.9 or later. | ||
| In that case, download and install Maven manually from https://maven.apache.org/download.cgi |
There was a problem hiding this comment.
even ubuntu 24.04 apt repo installs old maven 3.8.7, let's just replace it with manual install commands
|
Thanks a lot for your review @pan3793 and pointing out missed spots in the upgrade. |
| $ sudo apt-get -y install openjdk-17-jdk | ||
| * Maven | ||
| $ sudo apt-get -y install maven | ||
| Most package managers do not install required version of Maven i.e. 3.9.9 or later. |
There was a problem hiding this comment.
Should we add maven installation commands as well ?
There was a problem hiding this comment.
maybe say "compatible maven version" and then where the version requirement is declared. This is just to remove a place where changes are needed the next time a maven update is mandated
| Most package managers do not install required version of Maven i.e. 3.9.9 or later. | ||
| Download and Install Maven manually from https://maven.apache.org/install.html |
There was a problem hiding this comment.
let's replace this with the real commands
| Most package managers do not install required version of Maven i.e. 3.9.9 or later. | |
| Download and Install Maven manually from https://maven.apache.org/install.html | |
| $ curl -L https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.tar.gz > apache-maven-3.9.11-bin.tar.gz | |
| $ tar -zxvf apache-maven-3.9.11-bin.tar.gz -C /opt | |
| $ sudo ln -s /opt/apache-maven-3.9.11/bin/mvn /usr/bin |
Oops, I have the wrong memory, the dev container actually uses Maven 3.9.11, not 3.9.9, sorry for the misleading. Could you update the docs to use 3.9.11?
There was a problem hiding this comment.
No issues, thanks for checking.
I have made the changes
| $ sudo nano /etc/profile.d/maven.sh | ||
| $ export M2_HOME=/opt/maven | ||
| $ export MAVEN_HOME=/opt/maven | ||
| $ export PATH=${M2_HOME}/bin:${PATH} | ||
| $ sudo chmod +x /etc/profile.d/maven.sh | ||
| $ source /etc/profile.d/maven.sh |
There was a problem hiding this comment.
below setup is unnecessary if we create a soft link /usr/bin/mvn, please keep things simple
| $ sudo nano /etc/profile.d/maven.sh | |
| $ export M2_HOME=/opt/maven | |
| $ export MAVEN_HOME=/opt/maven | |
| $ export PATH=${M2_HOME}/bin:${PATH} | |
| $ sudo chmod +x /etc/profile.d/maven.sh | |
| $ source /etc/profile.d/maven.sh |
pan3793
left a comment
There was a problem hiding this comment.
LGTM, except for a minor comment
Thanks for your review @pan3793 |
steveloughran
left a comment
There was a problem hiding this comment.
Added a signature verification stage before untarring and linking to the maven binary.
| $ sudo apt-get -y install openjdk-17-jdk | ||
| * Maven | ||
| $ sudo apt-get -y install maven | ||
| Most package managers do not install required version of Maven i.e. 3.9.11 or later. |
There was a problem hiding this comment.
Replace with
Do not as of January 2026 install an up to date version of Maven.
| * Maven | ||
| $ sudo apt-get -y install maven | ||
| Most package managers do not install required version of Maven i.e. 3.9.11 or later. | ||
| Following commands download and install Maven manually |
There was a problem hiding this comment.
Use the following commands to download and install Maven manually
There was a problem hiding this comment.
Taken this suggestion
This comment was marked as outdated.
This comment was marked as outdated.
cnauroth
left a comment
There was a problem hiding this comment.
HADOOP-19790 is the last issue marked as a blocker for the 3.5.0 release. @anujmodi2021 , are you able to incorporate Steve's last round of feedback?
|
@cnauroth don't let my doc comments hold up the release process. we can see who ships first: 3.4.3 or 3.5.0 |
|
Hi @steveloughran @pan3793 @cnauroth Really sorry for keeping this waiting. I have refereshed this PR. Please review the latest iterations taking in suggestions from Steve and Cheng. I think ./mvnw is already incorported, does that mean we don't even need manual steps to downlod maven 3.9.11 in doc? |
@anujmodi2021, we can follow Steve's previous suggestion #8214 (comment)
The final statement might be: Install an up-to-date version of Maven, or use BTW, in #8257, I also update some words in BUILDING.md, you are welcome to review that. |
|
Thanks @pan3793 for clarification. I have taken the suggested change. I have kept the manual commands as well in case someone does not uses mvnw. |
|
Backmerged with trun to re-trigger build. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
@cnauroth @steveloughran @pan3793 need your help to get this unblocked. Yetus keep failing with some timeout issue. |
|
@anujmodi2021, the failure is irrelevant, I suggest merging it directly. |
|
merged it. If it is triggering problems, we can revert. |
Description of PR
Some recent updated done in certain dependencies have caused build failure on older maven versions.
For details refer to JIRA: https://issues.apache.org/jira/browse/HADOOP-19790
With the other upgrades going in 3.5.0, we propose to upgrade the minimum required maven version to the latest stable version i.e. 3.9.12
How was this patch tested?
Negative test: Build failed when attempted with maven version lesser than required.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (clean) on project hadoop-main: [ERROR] Rule 0: org.apache.maven.enforcer.rules.version.RequireMavenVersion failed with message: [ERROR] Detected Maven Version: 3.9.6 is not in the allowed range [3.9.12,).When attempted buid after upgrading maven to 3.9.12, build was successful
AI Tooling
No AI tools used