Skip to content

build: move to Java 21 #162

Closed
Closed

Description

@uniqueg

Why

Spring Boot 3 and 4 need Java 17 or later, and Java 8 holds back updates
(e.g. the Kubernetes client needs Java 11). Spring Boot 2.7 already runs on
Java 21, so the JDK can move first, on its own, and the later steps only
change the framework.

How

  • java.version 21 in pom.xml; Eclipse Temurin 21 (JDK and JRE) in the
    Dockerfile; the CI job Test on Java 21.
  • Replace the @ScriptAssert (JavaScript) on TesInput with an
    @AssertTrue method: Java 15 and later have no JavaScript engine, so on
    Java 21 every task with inputs failed with 500.
  • Open java.util and java.lang to the unit tests (argLine), for
    system-rules' EnvironmentVariables (until child 6).
  • Lint stays on Java 8: google-java-format 1.7 doesn't run on Java 21, and
    newer versions reformat the code (child 2).
  • Docs: README, development, deployment, upgrade notes (JAVA_OPTS options
    that Java 21 removed; the changed validation message).

Acceptance criteria

  • ./mvnw clean verify passes on Java 21; the CI jobs pass, including the
    image scan and the smoke test on the Java 21 image.
  • Tasks with inputs are accepted again on Java 21; inputs without url or
    content are refused with 400, as before.
  • Docs and upgrade notes updated.

Part of #66.

Metadata

Metadata

Assignees

Labels

priority: mediumtype: maintenanceworkload: hours

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions