Skip to content

TEDEFO-5287 Build and target Java 21 instead of Java 11 - #74

Draft
amiliosc wants to merge 2 commits into
developfrom
feature/TEDEFO-5287-build-and-target-java-21
Draft

amiliosc wants to merge 2 commits into
developfrom
feature/TEDEFO-5287-build-and-target-java-21

Conversation

@amiliosc

@amiliosc amiliosc commented Oct 19, 2026 •

Copy link
Copy Markdown

Merge prerequisites — on hold

Keep this PR in draft while MDM is not ready for Java 21. This is the agreed hold for the coordinated migration.

  • MDM readiness: TEDEFO-5065 — MDM migrate to Java 21. No MDM Java 21 migration MR was found as of 26 October 2026. Add its link here when opened and verify build, CI and runtime readiness before lifting the hold. MDM !1406 is already merged, but was only the preparatory step retaining Java 11.
  • Upstream PR(s): This is the first library PR in the chain; there is no preceding ECL/EXT/ESA/Viewer/CLI PR. Hold it with the rest of the coordinated migration until the MDM prerequisite below is ready.

MDM currently targets Java 11 and already consumes EXT 2.0.0-SNAPSHOT, Analyzer 1.16.0-SNAPSHOT and Notice Viewer 0.14.0-SNAPSHOT. Avoid publishing Java 21 replacements for those active coordinates before MDM is ready. ECL uses the new 2.0.0-SNAPSHOT coordinate; holding ECL too is part of the agreed rollout sequence.

After the hold is lifted: ECL → EXT → Analyzer and Notice Viewer (either order) → CLI after Notice Viewer. Wait for successful upstream snapshot publication and downstream verification between dependent merges.


Summary

Moves the library from Java 11 to Java 21. Build configuration and CI only —
no source changes were needed, the existing sources compile unchanged.

  • pom.xml: java.version 11 → 21; maven.compiler.source/target replaced
    by maven.compiler.release, which also rejects references to APIs newer than
    the target
  • pom.xml: pinned maven-compiler-plugin in pluginManagement (the
    version.compiler.plugin property existed but was wired to no plugin, so the
    version was floating); JaCoCo 0.8.10 → 0.8.12 for Java 21 bytecode
  • CI: java-version: 21 in the three workflows, and distribution: adopt →
    temurin since adopt is deprecated and publishes no Java 21 builds
  • README: Java version requirement updated in both places

Tested

mvn clean install on Temurin 21.0.12 — compiled at release 21, 99/99 tests
green, jar built.

japicmp could not be run locally: it fetched an EU Login HTML page instead of
the baseline jar through the corporate proxy, so the run used
-Djapicmp.skip=true. The API-compatibility check needs to pass in CI here.

Note for reviewers

This raises the bytecode level of a published artifact, so every consumer must
be on Java 21 before taking the release — a major-version change under semver.
Jira targets ECL 2.0.0 for that reason.

A stale origin/java21 branch (June 2025) reached the same pom conclusions
independently; it predates a year of develop and should probably be deleted.
It also bumps maven-source-plugin to 3.3.1, which this branch does not.

Jira: TEDEFO-5287

@amiliosc
amiliosc requested a review from rousso October 19, 2026 16:13

rousso commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Reviewed commit a7d0f62. The Java 21 compiler configuration, JaCoCo update, CI workflows and README changes look sound, but the artifact version needs to change before merging.

[P1] Move the artifact to 2.0.0-SNAPSHOT alongside the Java 21 requirement. pom.xml still declares 1.10.0-SNAPSHOT, so this change produces Java 21 bytecode under the same coordinates currently consumed by the EFX Toolkit, whose develop branch still builds on Java 11. A consumer resolving the updated snapshot would fail to compile or load the library. TEDEFO-5287 explicitly targets ECL 2.0.0 for this breaking change.

Verification on this commit:

  • mvn -o --batch-mode verify passed on JDK 21, with all 99 tests passing and japicmp enabled.
  • The generated jar is eforms-core-java-1.10.0-SNAPSHOT.jar; its classes have major version 65 (Java 21).
  • Loading SdkConstants from that jar on Java 11 reproduced UnsupportedClassVersionError (65.0 versus supported 55.0).
  • japicmp passed against 1.9.1. Its report records the class-file version change but still suggests a minor increment, so the green compatibility check does not enforce the required major-version bump.

Please move this change to the 2.0.0 version line and coordinate downstream Java 21 upgrades before consumers adopt it. If ECL 1.10.0 is still intended for Java 11 consumers, preserve that release first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants