From 22b8af0d4719d1472d26509660e5911ed3a41177 Mon Sep 17 00:00:00 2001 From: "Amilios\\Tmilios" Date: Tue, 20 Oct 2026 13:38:51 +0300 Subject: [PATCH 1/2] TEDEFO-5288: Build and target Java 21 instead of Java 11 Replace maven.compiler.source/target (11) with maven.compiler.release (21). The release flag also verifies that no API newer than the target is referenced, so a Java 21 method cannot silently leak into a build claiming an older target. Pin maven-compiler-plugin in pluginManagement via a new version.compiler.plugin property; it was previously unpinned and its version floated with the Maven version in use. Move the build, javadoc and publish workflows to java-version 21 and distribution temurin. The adopt distribution is deprecated and publishes no Java 21 builds. No source changes are needed: the existing main and test sources, including the ANTLR-generated parsers, compile unchanged under release 21. This raises the bytecode level of a published artifact, so consumers must be on Java 21 or later. README and CHANGELOG record the new requirement. --- .github/workflows/build.yml | 4 ++-- .github/workflows/javadoc.yml | 4 ++-- .github/workflows/publish.yml | 4 ++-- CHANGELOG.md | 1 + README.md | 2 +- pom.xml | 8 ++++++-- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5356e5b2..50789746 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: - java-version: '11' - distribution: 'adopt' + java-version: '21' + distribution: 'temurin' - name: Build package run: mvn --batch-mode clean install diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml index 5c308ac5..2fc5843e 100644 --- a/.github/workflows/javadoc.yml +++ b/.github/workflows/javadoc.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: - java-version: '11' - distribution: 'adopt' + java-version: '21' + distribution: 'temurin' - name: Check javadoc run: mvn --batch-mode clean test-compile javadoc:javadoc javadoc:test-javadoc diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bc153f51..f7fabb32 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,8 +27,8 @@ jobs: - name: Set up Java for publishing to Maven Central Repository uses: actions/setup-java@v4 with: - java-version: '11' - distribution: 'adopt' + java-version: '21' + distribution: 'temurin' server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d142fa6..64acc8e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This is an incremental update over 2.0.0-alpha.8. ### Changes since 2.0.0-alpha.8 +- **Java 21 required**: the toolkit now targets Java 21. Applications using it must build and run on Java 21 or later. - **Symbol resolution**: applications can now use their own metadata-loading mechanism while reusing the toolkit’s XPath symbol-resolution logic. This logic has been extracted into the abstract `XPathSymbolResolver` class. The existing `SdkSymbolResolver` extends it and continues to load metadata from SDK files using the eForms Core Library. The following sections describe the features of the 2.0.0 line. For the changes introduced in the preceding release, see the [2.0.0-alpha.8 release notes](https://github.com/OP-TED/efx-toolkit-java/releases/tag/2.0.0-alpha.8). diff --git a/README.md b/README.md index 623e8539..9361b2d9 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The documentation is available at: https://docs.ted.europa.eu/eforms/latest/efx- ## Using the EFX toolkit[^1] -The EFX toolkit requires Java 11 or later. +The EFX toolkit requires Java 21 or later. It is available as a Maven package on Maven Central and can be used by adding the following to the project's `pom.xml`. diff --git a/pom.xml b/pom.xml index c9e1de88..96b89525 100644 --- a/pom.xml +++ b/pom.xml @@ -40,8 +40,7 @@ UTF-8 2026-09-17T10:29:14Z - 11 - 11 + 21 ${project.build.directory}/eforms-sdk/antlr4 @@ -63,6 +62,7 @@ 3.3.0 + 3.13.0 3.3.0 2.5.2 0.8.12 @@ -207,6 +207,10 @@ + + maven-compiler-plugin + ${version.compiler.plugin} + maven-surefire-plugin ${version.surefire.plugin} From 427ce648b76afab74e4473d8a4afe5d17cac8508 Mon Sep 17 00:00:00 2001 From: "Amilios\\Tmilios" Date: Mon, 26 Oct 2026 17:01:49 +0200 Subject: [PATCH 2/2] TEDEFO-5288: Pin eForms Core 2.0.0-SNAPSHOT for the Java 21 version line --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 96b89525..f2ee47c3 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ 1.16.0-SNAPSHOT 2.0.0-SNAPSHOT - 1.10.0-SNAPSHOT + 2.0.0-SNAPSHOT 4.13.1