Skip to content

Commit 03b5f1d

Browse files
authored
TEZ-4636: Move to JDK-21+ (#418). (Ayush Saxena, reviewed by Laszlo Bodor, Mahesh Raju Somalaraju)
1 parent b0a65ec commit 03b5f1d

4 files changed

Lines changed: 16 additions & 17 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
build:
2828
strategy:
2929
matrix:
30-
java-version: [17]
30+
java-version: [21, 24]
3131
os: [ubuntu-latest, macos-latest]
3232
runs-on: ${{ matrix.os }}
3333
steps:

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ pipeline {
147147
# help keep the ASF boxes clean
148148
YETUS_ARGS+=("--sentinel")
149149
150-
# test with Java 17
151-
YETUS_ARGS+=("--java-home=/usr/lib/jvm/java-17-openjdk-amd64")
150+
# test with Java 21
151+
YETUS_ARGS+=("--java-home=/usr/lib/jvm/java-21-openjdk-amd64")
152152
YETUS_ARGS+=("--debug")
153153
154154
# write Yetus report as GitHub comment (YETUS-1102)

build-tools/docker/Dockerfile

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#
2525
###############
2626

27-
FROM ubuntu:jammy AS tezbase
27+
FROM ubuntu:noble AS tezbase
2828

2929
WORKDIR /root
3030
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
@@ -168,15 +168,15 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
168168
# OpenJDK 17
169169
# hadolint ignore=DL3008
170170
RUN apt-get -q update \
171-
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y openjdk-17-jdk \
171+
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y openjdk-21-jdk \
172172
&& apt-get clean && rm -rf /var/lib/apt/lists/*
173173

174174
# Set JAVA_HOME and PATH environment variables
175-
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
175+
ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
176176
ENV PATH="${JAVA_HOME}/bin:${PATH}"
177177

178178
# Set the default Java version using update-alternatives
179-
RUN update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-17-openjdk-amd64/bin/java 1
179+
RUN update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-21-openjdk-amd64/bin/java 1
180180

181181
#######
182182
# Install SpotBugs 4.9.3
@@ -223,9 +223,9 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
223223
&& apt-get clean \
224224
&& rm -rf /var/lib/apt/lists/* \
225225
&& curl -sSL https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py \
226-
&& python3 /tmp/get-pip.py \
226+
&& python3 /tmp/get-pip.py --break-system-packages \
227227
&& rm /usr/local/bin/pip /tmp/get-pip.py \
228-
&& pip3 install -v \
228+
&& pip3 install --break-system-packages -v \
229229
astroid==2.4.2 \
230230
codespell==2.0 \
231231
pylint==2.5.3 \
@@ -239,14 +239,12 @@ RUN ln -s /usr/local/bin/pip3 /usr/local/bin/pip
239239
# Install npm and JSHint
240240
###
241241
# hadolint ignore=DL3008
242-
RUN curl -sSL https://deb.nodesource.com/setup_14.x | bash - \
243-
&& apt-get -q install --no-install-recommends -y nodejs \
244-
&& apt-get clean \
245-
&& rm -rf /var/lib/apt/lists/* \
242+
RUN apt-get update && apt-get install --no-install-recommends -y nodejs npm \
246243
&& npm install -g \
247244
jshint@2.12.0 \
248245
markdownlint-cli@0.23.2 \
249-
&& rm -rf /root/.npm
246+
&& apt-get clean \
247+
&& rm -rf /var/lib/apt/lists/* /root/.npm
250248

251249
#####
252250
# Now all the stuff that was built in parallel

pom.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141

4242
<properties>
4343
<!-- Build Properties -->
44-
<maven.compiler.source>17</maven.compiler.source>
45-
<maven.compiler.target>17</maven.compiler.target>
44+
<maven.compiler.source>21</maven.compiler.source>
45+
<maven.compiler.target>21</maven.compiler.target>
4646
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
4747
<surefire.version>3.0.0-M4</surefire.version>
4848
<failIfNoTests>false</failIfNoTests>
@@ -88,7 +88,7 @@
8888
<maven-shade-plugin.version>3.6.0</maven-shade-plugin.version>
8989
<maven-site-plugin.version>3.12.1</maven-site-plugin.version>
9090
<metrics-core.version>3.1.0</metrics-core.version>
91-
<mockito-core.version>4.3.1</mockito-core.version>
91+
<mockito-core.version>4.8.1</mockito-core.version>
9292
<netty.version>4.1.116.Final</netty.version>
9393
<pig.version>0.13.0</pig.version>
9494
<protobuf.version>3.25.5</protobuf.version>
@@ -106,6 +106,7 @@
106106
--add-opens=java.base/java.lang=ALL-UNNAMED
107107
--add-opens=java.base/java.util=ALL-UNNAMED
108108
--add-opens java.base/java.io=ALL-UNNAMED
109+
-Dnet.bytebuddy.experimental=true
109110
</test.jvm.args>
110111

111112
<maven.javadoc.skip>true</maven.javadoc.skip> <!-- enabled only in relevant modules separately -->

0 commit comments

Comments
 (0)