adoroszlai opened a new pull request, #12125: URL: https://github.com/apache/ozone/pull/12125
## What changes were proposed in this pull request? Enforce JDK version (17) and OS family (Unix) for release to make sure that: - class files do not reference code added in later JDK (workaround for https://github.com/eclipse-aspectj/aspectj/issues/388) - `hdds-rocks-native` is compiled for Unix, not Mac (HDDS-15880) (We'll need to add `-Prelease` to the release manager guide.) https://issues.apache.org/jira/browse/HDDS-17887 ## How was this patch tested? Tested JDK 11, 17, 21, with and without `-Prelease` profile. ```bash $ export MAVEN_ARGS="-B -N -Dorg.slf4j.simpleLogger.showDateTime=false" $ export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 $ ./mvnw validate ... [INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireJavaVersion passed ... <no RequireOS rule> ... [INFO] BUILD SUCCESS $ ./mvnw -Prelease validate ... [INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireJavaVersion passed ... [INFO] Rule 0: org.apache.maven.enforcer.rules.RequireOS passed ... [INFO] BUILD SUCCESS $ export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 $ ./mvnw validate ... [INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireJavaVersion passed ... <no RequireOS rule> ... [INFO] BUILD SUCCESS $ ./mvnw -Prelease validate ... [ERROR] Rule 1: org.apache.maven.enforcer.rules.version.RequireJavaVersion failed with message: [ERROR] Detected JDK /usr/lib/jvm/java-21-openjdk-amd64 is version 21.0.13-1 which is not in the allowed range [17,17.9999]. $ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 $ ./mvnw validate ... [ERROR] Rule 1: org.apache.maven.enforcer.rules.version.RequireJavaVersion failed with message: [ERROR] Detected JDK /usr/lib/jvm/java-11-openjdk-amd64 is version 11.0.33-1 which is not in the allowed range [17,). $ ./mvnw -Prelease validate ... [ERROR] Rule 1: org.apache.maven.enforcer.rules.version.RequireJavaVersion failed with message: [ERROR] Detected JDK /usr/lib/jvm/java-11-openjdk-amd64 is version 11.0.33-1 which is not in the allowed range [17,17.9999]. ``` CI: https://github.com/adoroszlai/ozone/actions/runs/45008750921 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
