From be4fd68c9a9be817d78fcf4e836cc673659a46f4 Mon Sep 17 00:00:00 2001 From: Dannes Wessels Date: Sun, 23 Feb 2025 21:33:15 +0100 Subject: [PATCH 1/5] [cicd] Migrate to Java21 --- .github/workflows/ci-container.yml | 6 ++--- .github/workflows/ci-snapshots.yml | 4 ++-- .github/workflows/ci-test.yml | 4 ++-- .github/workflows/ci-xqts.yml | 4 ++-- .github/workflows/sonarcloud.yml | 4 ++-- exist-core-jmh/pom.xml | 5 ----- exist-core/pom.xml | 7 +++--- exist-parent/pom.xml | 36 +++++++++++++++++++++++++----- 8 files changed, 45 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci-container.yml b/.github/workflows/ci-container.yml index 21b41b67390..24ae8af927e 100644 --- a/.github/workflows/ci-container.yml +++ b/.github/workflows/ci-container.yml @@ -11,11 +11,11 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 1 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: distribution: liberica - java-version: '17' + java-version: '21' - name: Set up QEMU uses: docker/setup-qemu-action@v3 with: @@ -36,7 +36,7 @@ jobs: # Hack around #5450 - name: pull base image run: | - docker pull --platform linux/amd64 --platform linux/arm64 gcr.io/distroless/java17-debian12:latest + docker pull --platform linux/amd64 --platform linux/arm64 gcr.io/distroless/java21-debian12:latest - name: Build images run: mvn -V -B -q -Pdocker -DskipTests -Ddependency-check.skip=true -P !mac-dmg-on-unix,!installer,!concurrency-stress-tests,!micro-benchmarks,skip-build-dist-archives clean package - name: Check local images diff --git a/.github/workflows/ci-snapshots.yml b/.github/workflows/ci-snapshots.yml index 965472d7461..f88d0c5727a 100644 --- a/.github/workflows/ci-snapshots.yml +++ b/.github/workflows/ci-snapshots.yml @@ -15,11 +15,11 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 1 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: distribution: liberica - java-version: '17' + java-version: '21' server-id: github settings-path: ${{ github.workspace }} - name: Cache Maven packages diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 66a053a3267..9eab3f6f32d 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -4,7 +4,7 @@ permissions: contents: read env: MAVEN_OPTS: -DtrimStackTrace=false -D'maven.resolver.transport=wagon' - DEV_JDK: '17' + DEV_JDK: '21' jobs: license: name: License check @@ -40,7 +40,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macOS-latest] - jvm: ['17', '21'] + jvm: ['21'] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ci-xqts.yml b/.github/workflows/ci-xqts.yml index f326aec0910..883e50bf4ae 100644 --- a/.github/workflows/ci-xqts.yml +++ b/.github/workflows/ci-xqts.yml @@ -9,11 +9,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: distribution: liberica - java-version: '17' + java-version: '21' - name: Cache Maven packages uses: actions/cache@v4 with: diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 1bc41d15196..cfd886ece17 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -14,11 +14,11 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: distribution: liberica - java-version: 17 + java-version: 21 - name: Cache SonarCloud packages uses: actions/cache@v4 with: diff --git a/exist-core-jmh/pom.xml b/exist-core-jmh/pom.xml index b67ce915781..2516466af64 100644 --- a/exist-core-jmh/pom.xml +++ b/exist-core-jmh/pom.xml @@ -121,11 +121,6 @@ org.apache.maven.plugins maven-compiler-plugin - - ${project.build.target} - ${project.build.source} - ${project.build.target} - org.apache.maven.plugins diff --git a/exist-core/pom.xml b/exist-core/pom.xml index a9abcc918d0..b50fb2b8ba5 100644 --- a/exist-core/pom.xml +++ b/exist-core/pom.xml @@ -1094,6 +1094,7 @@ The BaseX Team. The original license statement is also included below.]]> + org.apache.maven.plugins maven-compiler-plugin @@ -1135,9 +1136,9 @@ The BaseX Team. The original license statement is also included below.]]> true true - ${project.build.source} - ${project.build.source} - ${project.build.target} + ${maven.compiler.release} + ${maven.compiler.source} + ${maven.compiler.target}