diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 9f960de..e4a7223 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 and run unit tests
run: mvn --batch-mode clean install
diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml
index 5c308ac..2fc5843 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 b71ee09..c64b149 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'
# Written here because setup-java cannot declare repositoryOrigins. Since Maven 3.10, the
# credentials of a server are sent only to the hosts known for its id, and for the id central
# that is only repo.maven.apache.org. Without central.sonatype.com, snapshots are uploaded
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b00699e..1b90938 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,14 +1,14 @@
-# eForms Core Library 1.10.0 Release Notes
+# eForms Core Library 2.0.0-alpha.1 Release Notes
The eForms Core Library is a collection of utilities used by the EFX Toolkit for Java Developers and other eForms applications.
## In this release
-This release introduces support for the SDK 2 metadata files located in `fields/fwd`. The new class `SdkRepositoryFactory` creates the repositories of nodes, fields and data types for a given SDK version, for both SDK 1 and SDK 2. The repository constructors that read a single file are deprecated in favour of this factory.
+This is the first pre-release of version 2.0.0. It contains all the changes of version 1.10.0, together with the following changes.
-The SDK downloader now authenticates with the repositories declared in the Maven `settings.xml` file, and takes into account the profiles that are active by default.
+The library now requires Java 21 or later.
-This is the final release of the 1.x line. It requires Java 11 or later.
+The alias of fields and nodes has been removed, as EFX 2 no longer uses aliases. `SdkFieldV2` and `SdkNodeV2` no longer provide `getAlias()`, and their constructors no longer take an alias parameter. Applications that call these constructors or this method must be adapted. JSON that is deserialised directly into these classes must no longer contain an `alias` property, as it is now rejected.
## Download
diff --git a/README.md b/README.md
index 0396b9f..51dd8f9 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ This library provides a set of classes that can be used to solve some common "pr
## Using the eForms Core Library
-The eForms Core library requires Java 11 or later.
+The eForms Core library 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`.
@@ -34,7 +34,7 @@ Replace `${eforms-core.version}` with the latest version available, or define th
Requirements:
-* Java 11 or higher
+* Java 21 or higher
* Maven 3.8, other versions probably also work
Execute the following on the root folder of this project:
diff --git a/pom.xml b/pom.xml
index 36add87..5bcc2e1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
eu.europa.ted.eforms
eforms-core-java
- 1.10.0
+ 2.0.0-alpha.1
eForms Core Library
API and tools for eForms applications.
@@ -33,13 +33,12 @@
- 2026-11-27T14:25:32Z
+ 2026-11-28T12:35:13Z
UTF-8
- 11
- ${java.version}
- ${java.version}
+ 21
+ ${java.version}
4.13.1
@@ -64,10 +63,10 @@
3.3.0
- 3.10.1
+ 3.13.0
1.5
2.5.2
- 0.8.10
+ 0.8.12
0.20.0
3.4.0
3.2.1
@@ -377,6 +376,10 @@
+
+ maven-compiler-plugin
+ ${version.compiler.plugin}
+
maven-surefire-plugin
${version.surefire.plugin}
diff --git a/src/main/java/eu/europa/ted/eforms/sdk/entity/v2/SdkFieldV2.java b/src/main/java/eu/europa/ted/eforms/sdk/entity/v2/SdkFieldV2.java
index 6d7be29..5ee0abb 100644
--- a/src/main/java/eu/europa/ted/eforms/sdk/entity/v2/SdkFieldV2.java
+++ b/src/main/java/eu/europa/ted/eforms/sdk/entity/v2/SdkFieldV2.java
@@ -28,17 +28,13 @@ public class SdkFieldV2 extends SdkFieldV1 {
*/
private static final String DISCLOSURE_CONTROL = "disclosureControl";
- private final String alias;
-
public SdkFieldV2(String id, String type, String parentNodeId, String xpathAbsolute,
- String xpathRelative, String rootCodelistId, boolean repeatable, String alias) {
+ String xpathRelative, String rootCodelistId, boolean repeatable) {
super(id, type, parentNodeId, xpathAbsolute, xpathRelative, rootCodelistId, repeatable);
- this.alias = alias;
}
public SdkFieldV2(JsonNode fieldNode) {
super(fieldNode);
- this.alias = fieldNode.has("alias") ? fieldNode.get("alias").asText(null) : null;
}
@JsonCreator
@@ -49,14 +45,9 @@ public SdkFieldV2(
@JsonProperty("xpathAbsolute") final String xpathAbsolute,
@JsonProperty("xpathRelative") final String xpathRelative,
@JsonProperty("codeList") final Map> codelist,
- @JsonProperty("repeatable") final Map repeatable,
- @JsonProperty("alias") final String alias) {
+ @JsonProperty("repeatable") final Map repeatable) {
this(id, type, parentNodeId, xpathAbsolute, xpathRelative, getCodelistId(codelist),
- getRepeatable(repeatable), alias);
- }
-
- public String getAlias() {
- return alias;
+ getRepeatable(repeatable));
}
/**
diff --git a/src/main/java/eu/europa/ted/eforms/sdk/entity/v2/SdkNodeV2.java b/src/main/java/eu/europa/ted/eforms/sdk/entity/v2/SdkNodeV2.java
index 9d98cee..bf0657d 100644
--- a/src/main/java/eu/europa/ted/eforms/sdk/entity/v2/SdkNodeV2.java
+++ b/src/main/java/eu/europa/ted/eforms/sdk/entity/v2/SdkNodeV2.java
@@ -12,7 +12,6 @@
*/
@SdkComponent(versions = {"2"}, componentType = SdkComponentType.NODE)
public class SdkNodeV2 extends SdkNodeV1 {
- private final String alias;
@JsonCreator
public SdkNodeV2(
@@ -20,18 +19,11 @@ public SdkNodeV2(
@JsonProperty("parentId") String parentId,
@JsonProperty("xpathAbsolute") String xpathAbsolute,
@JsonProperty("xpathRelative") String xpathRelative,
- @JsonProperty("repeatable") boolean repeatable,
- @JsonProperty("alias") String alias) {
+ @JsonProperty("repeatable") boolean repeatable) {
super(id, parentId, xpathAbsolute, xpathRelative, repeatable);
- this.alias = alias;
}
public SdkNodeV2(JsonNode node) {
super(node);
- this.alias = node.has("alias") ? node.get("alias").asText(null) : null;
- }
-
- public String getAlias() {
- return alias;
}
}
diff --git a/src/test/java/eu/europa/ted/eforms/sdk/repository/SdkFieldRepositoryTest.java b/src/test/java/eu/europa/ted/eforms/sdk/repository/SdkFieldRepositoryTest.java
index 980213c..94b8b5d 100644
--- a/src/test/java/eu/europa/ted/eforms/sdk/repository/SdkFieldRepositoryTest.java
+++ b/src/test/java/eu/europa/ted/eforms/sdk/repository/SdkFieldRepositoryTest.java
@@ -281,7 +281,6 @@ void testEachSdkVersionGetsItsOwnFields() throws InstantiationException {
assertTrue(ofSdk1 instanceof SdkFieldV1, "SDK 1 gives " + ofSdk1.getClass());
assertTrue(ofSdk2 instanceof SdkFieldV2, "SDK 2 gives " + ofSdk2.getClass());
- assertEquals("plain", ((SdkFieldV2) ofSdk2).getAlias(), "SDK 2 also reads the alias");
}
/** The constructor that takes a fields.json reads the file it is given. */
diff --git a/src/test/java/eu/europa/ted/eforms/sdk/repository/SdkNodeRepositoryTest.java b/src/test/java/eu/europa/ted/eforms/sdk/repository/SdkNodeRepositoryTest.java
index 7f0a90a..4e56f4e 100644
--- a/src/test/java/eu/europa/ted/eforms/sdk/repository/SdkNodeRepositoryTest.java
+++ b/src/test/java/eu/europa/ted/eforms/sdk/repository/SdkNodeRepositoryTest.java
@@ -134,7 +134,6 @@ void testEachSdkVersionGetsItsOwnNodes() throws InstantiationException {
assertTrue(ofSdk1 instanceof SdkNodeV1, "SDK 1 gives " + ofSdk1.getClass());
assertTrue(ofSdk2 instanceof SdkNodeV2, "SDK 2 gives " + ofSdk2.getClass());
- assertEquals("root", ((SdkNodeV2) ofSdk2).getAlias(), "SDK 2 also reads the alias");
}
/**
diff --git a/src/test/resources/sdk-fixture/2.0-without-stable-ids/fields/fwd/fields.json b/src/test/resources/sdk-fixture/2.0-without-stable-ids/fields/fwd/fields.json
index c5223af..bb59014 100644
--- a/src/test/resources/sdk-fixture/2.0-without-stable-ids/fields/fwd/fields.json
+++ b/src/test/resources/sdk-fixture/2.0-without-stable-ids/fields/fwd/fields.json
@@ -6,8 +6,7 @@
"xpathAbsolute" : "/*/cac:ProcurementProjectLot/cbc:Plain",
"xpathRelative" : "cbc:Plain",
"type" : "text",
- "repeatable" : true,
- "alias" : "plain"
+ "repeatable" : true
},
{
"id" : "BT-NotRepeatable",
diff --git a/src/test/resources/sdk-fixture/2.0/fields/fwd/fields.json b/src/test/resources/sdk-fixture/2.0/fields/fwd/fields.json
index 77687e0..962301b 100644
--- a/src/test/resources/sdk-fixture/2.0/fields/fwd/fields.json
+++ b/src/test/resources/sdk-fixture/2.0/fields/fwd/fields.json
@@ -12,8 +12,7 @@
"xpathAbsolute" : "/*/cac:ProcurementProjectLot/cbc:Plain",
"xpathRelative" : "cbc:Plain",
"type" : "text",
- "repeatable" : true,
- "alias" : "plain"
+ "repeatable" : true
}, {
"id" : "BT-NotRepeatable",
"parentNodeId" : "ND-Lot",
diff --git a/src/test/resources/sdk-fixture/2.0/fields/fwd/nodes.json b/src/test/resources/sdk-fixture/2.0/fields/fwd/nodes.json
index adc565a..6c2a169 100644
--- a/src/test/resources/sdk-fixture/2.0/fields/fwd/nodes.json
+++ b/src/test/resources/sdk-fixture/2.0/fields/fwd/nodes.json
@@ -7,8 +7,7 @@
"id" : "ND-Root",
"xpathAbsolute" : "/*",
"xpathRelative" : "/*",
- "repeatable" : false,
- "alias" : "root"
+ "repeatable" : false
}, {
"id" : "ND-Fwd-Only",
"parentId" : "ND-Lot",
@@ -20,7 +19,6 @@
"parentId" : "ND-Root",
"xpathAbsolute" : "/*/cac:ProcurementProjectLot",
"xpathRelative" : "cac:ProcurementProjectLot",
- "repeatable" : true,
- "alias" : "lot"
+ "repeatable" : true
} ]
}