This is an automated email from the ASF dual-hosted git repository. xianjingfeng pushed a commit to branch branch-0.9 in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/branch-0.9 by this push: new e858cb3a5 [#1982] fix(build): specify maven.compiler.release while JDK version greater than 8 (#1983) e858cb3a5 is described below commit e858cb3a5b4791c3c2f52dcd4df9d62c029919ee Author: xianjingfeng <xianjingfeng...@gmail.com> AuthorDate: Fri Aug 9 10:24:27 2024 +0800 [#1982] fix(build): specify maven.compiler.release while JDK version greater than 8 (#1983) ### What changes were proposed in this pull request? Set maven.compiler.release to 8 by default when compiling with higher JDK versions ### Why are the changes needed? Fix: #1982 ### Does this PR introduce _any_ user-facing change? Yes, kind of. Uniffle client built by higher JDK versions can would directly on JDK 1.8 ### How was this patch tested? Compile with JDK11 and examine the byte code using `javap`. (cherry picked from commit cd611122d056520f16e6745223c78dda5c4b08bc) --- README.md | 2 ++ pom.xml | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 3757bd77f..b983cc77e 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,8 @@ Build with dashboard ./mvnw -DskipTests clean package -Pdashboard +> note: currently Uniffle build the project against Java 8. If you want to compile it against other Java versions, you can build the code with `-Dmaven.compiler.release=${release-version}`. + To package the Uniffle, run: ./build_distribution.sh diff --git a/pom.xml b/pom.xml index fe93ceb22..fe673d70b 100644 --- a/pom.xml +++ b/pom.xml @@ -1208,6 +1208,16 @@ </reporting> <profiles> + <profile> + <id>set-compiler-release</id> + <activation> + <jdk>[9,)</jdk> + </activation> + <properties> + <maven.compiler.release>8</maven.compiler.release> + </properties> + </profile> + <profile> <id>dashboard</id> <modules>