-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-29405 Run spotless:apply with java 17 when creating release #7116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the maven_spotless_apply
function to run the Spotless plugin with Java 17 in the release creation script.
- Prefixes the Maven invocation with
JAVA_HOME
pointing to a Java 17 install to satisfy plugin requirements. - Adds a comment explaining the Java version requirement.
@@ -887,7 +887,8 @@ function get_hadoop3_version() { | |||
# For 2.x, the generated CHANGES.md and RELEASENOTES.md may have lines end with whitespace and | |||
# case spotless:check failure, so we should run spotless:apply before committing | |||
function maven_spotless_apply() { | |||
"${MVN[@]}" spotless:apply | |||
# our spotless plugin version requires at lease java 11 to run, so we use java 17 here | |||
JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64" "${MVN[@]}" spotless:apply |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Hard-coding the JAVA_HOME
path may not work on all environments. Consider detecting the Java 17 installation dynamically or making the path configurable.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use this as the java 17 path all cross the scripts. Can do abstract later.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
No description provided.