From 6f15c40c79a7485bbc0e94c5a7bf8abebeadda4a Mon Sep 17 00:00:00 2001 From: James Milligan Date: Thu, 2 Jul 2026 20:31:12 +0000 Subject: [PATCH] Upgrade to Java 25 Replace maven.compiler.source/target with maven.compiler.release=25, which also validates against the JDK 25 API baseline (unlike plain source/target). Explicitly pin maven-compiler-plugin to 3.15.0 for reproducibility, matching every other plugin already pinned in this pom (Maven's own default lifecycle binding already resolves to this version, so behavior is unchanged). Bump java-version to 25 in both GitHub Actions workflows, and move the devcontainer base image from the 3-17-trixie tag to 3-25-trixie. maven-surefire-plugin is already 3.5.6 from the dependency-update branch, which has JDK 25 fork/run support. Verified locally that the release=25 setting is live: compiling under this container's current JDK 17 correctly fails with "release version 25 not supported". Full compile/test verification under an actual JDK 25 requires rebuilding the devcontainer with the new image. --- .devcontainer/devcontainer.json | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/maven-publish.yml | 2 +- pom.xml | 8 ++++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7d0427c..23c0966 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ { "name": "Java", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/java:3-17-trixie", + "image": "mcr.microsoft.com/devcontainers/java:3-25-trixie", "features": { "ghcr.io/devcontainers/features/java:1": { diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a3830c..5bcc579 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: - name: Setup up JDK uses: actions/setup-java@v5.4.0 with: - java-version: 17 + java-version: 25 cache: 'maven' distribution: 'temurin' - name: Build and analyze diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 752cc51..0dca208 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Maven Central Repository uses: actions/setup-java@v5.4.0 with: - java-version: 17 + java-version: 25 distribution: 'temurin' server-id: central server-username: MAVEN_USERNAME diff --git a/pom.xml b/pom.xml index 637ee99..9786578 100644 --- a/pom.xml +++ b/pom.xml @@ -38,8 +38,7 @@ UTF-8 - 17 - 17 + 25 @@ -91,6 +90,11 @@ + + org.apache.maven.plugins + maven-compiler-plugin + 3.15.0 + org.apache.maven.plugins maven-enforcer-plugin