Skip to content

Commit 3166260

Browse files
committed
HBASE-25465 Use javac --release option for supporting cross version compilation in create-release
* Update our jdk11 build profile in the pom so that it uses the additional flag on javac, requires maven 3.6+. * update create-release Dockerfile to use jdk11-headless
1 parent f16b7b1 commit 3166260

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

dev-support/create-release/hbase-rm/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y update \
3434
libcurl4-openssl-dev='7.58.0-*' \
3535
libxml2-dev='2.9.4+dfsg1-*' \
3636
lsof='4.89+dfsg-*' \
37-
openjdk-8-jdk='8u*' \
37+
openjdk-11-jdk-headless='11*' \
3838
python-pip='9.0.1-*' \
3939
subversion='1.9.7-*' \
4040
wget='1.19.4-*' \
4141
&& apt-get clean \
4242
&& rm -rf /var/lib/apt/lists/* \
43-
&& update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java \
43+
&& update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java \
4444
&& pip install \
4545
python-dateutil==2.8.1
4646

pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,9 @@
17091709
yyyy-MM-dd'T'HH:mm
17101710
</maven.build.timestamp.format>
17111711
<buildDate>${maven.build.timestamp}</buildDate>
1712+
<!-- these two control the Java language version and JVM runtime version supported -->
17121713
<compileSource>1.8</compileSource>
1714+
<releaseTarget>8</releaseTarget>
17131715
<!-- Build dependencies -->
17141716
<maven.min.version>3.0.4</maven.min.version>
17151717
<java.min.version>${compileSource}</java.min.version>
@@ -2702,6 +2704,7 @@
27022704
<jdk>[1.11,)</jdk>
27032705
</activation>
27042706
<properties>
2707+
<maven.compiler.release>${releaseTarget}</maven.compiler.release>
27052708
<!-- TODO: replicate logic for windows support -->
27062709
<argLine>--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED ${hbase-surefire.argLine}</argLine>
27072710
<!-- We need a minimum HDFS version of 3.2.0 for HADOOP-12760 -->

0 commit comments

Comments
 (0)