Skip to content

Commit 7e7c13c

Browse files
Merge pull request #36 from OP-TED/release/1.4.0
Release 1.4.0
2 parents 1b8053d + 3cc7a29 commit 7e7c13c

16 files changed

Lines changed: 395 additions & 106 deletions

.github/workflows/build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build and run unit tests
2+
on:
3+
push:
4+
pull_request:
5+
6+
# Allows to run this workflow manually from the Actions tab
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-java@v4
17+
with:
18+
java-version: '11'
19+
distribution: 'adopt'
20+
- name: Build and run unit tests
21+
run: mvn --batch-mode clean install

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ jobs:
1818
contents: read
1919
packages: write
2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222
- name: Import GPG Key
23-
uses: crazy-max/ghaction-import-gpg@v5
23+
uses: crazy-max/ghaction-import-gpg@v6
2424
with:
2525
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
2626
passphrase: ${{ secrets.GPG_PASSPHRASE }}
2727
- name: Set up Java for publishing to Maven Central Repository
28-
uses: actions/setup-java@v3
28+
uses: actions/setup-java@v4
2929
with:
3030
java-version: '11'
3131
distribution: 'adopt'

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
# eForms Core Library 1.3.0 Release Notes
1+
# eForms Core Library 1.4.0 Release Notes
22

33
The eForms Core Library is a collection of utilities that are used by our sample applications as well as the EFX Toolkit for Java Developers.
44

55
## In this release
66

7-
This release improves XPathProcessor contextualisation by fixing an issue that caused unnecessary back-steps to be inserted in the contextualised output when both XPaths contain predicates.
7+
This release adds the option to indicate a qualifier for SDK components. If there are 2 or more classes that have an @SdkComponent annotation with the same version and component type, this allows you to differentiate them and load the component with the matching qualifier.
8+
9+
The versions of various dependencies was updated: ANTLR 4.13.1, JAXB 4.0.4, logback 1.5.3, ph-genericode 7.1.1.
810

911
## Download
1012

pom.xml

Lines changed: 49 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>eu.europa.ted.eforms</groupId>
55
<artifactId>eforms-core-java</artifactId>
6-
<version>1.3.0</version>
6+
<version>1.4.0</version>
77

88
<name>eForms Core Library</name>
99
<description>API and tools for eForms applications.</description>
@@ -44,7 +44,7 @@
4444
</distributionManagement>
4545

4646
<properties>
47-
<project.build.outputTimestamp>2023-11-17T15:30:31Z</project.build.outputTimestamp>
47+
<project.build.outputTimestamp>2024-08-02T09:11:15Z</project.build.outputTimestamp>
4848
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4949

5050
<sonatype.server.url>s01.oss.sonatype.org</sonatype.server.url>
@@ -55,18 +55,18 @@
5555
<maven.compiler.target>${java.version}</maven.compiler.target>
5656

5757
<!-- Versions - Third-party libraries -->
58-
<version.antlr4>4.9.3</version.antlr4>
58+
<version.antlr4>4.13.1</version.antlr4>
5959
<version.commons-collections>3.2.2</version.commons-collections>
6060
<version.commons-io>2.11.0</version.commons-io>
6161
<version.commons-lang3>3.12.0</version.commons-lang3>
6262
<version.jackson>2.15.1</version.jackson>
63+
<version.jaxb-impl>4.0.4</version.jaxb-impl>
6364
<version.jool>0.9.15</version.jool>
64-
<version.jsr305>3.0.2</version.jsr305>
6565
<version.junit>5.7.2</version.junit>
66-
<version.logback>1.4.4</version.logback>
66+
<version.logback>1.5.3</version.logback>
6767
<version.maven>3.8.6</version.maven>
68-
<version.ph>10.0.0</version.ph>
69-
<version.ph-genericode>6.2.0</version.ph-genericode>
68+
<version.ph-jaxb>11.1.3</version.ph-jaxb>
69+
<version.ph-genericode>7.1.1</version.ph-genericode>
7070
<version.reflections>0.10.2</version.reflections>
7171
<version.resolver>1.8.2</version.resolver>
7272
<version.semver4j>3.1.0</version.semver4j>
@@ -78,10 +78,11 @@
7878
<version.gpg.plugin>1.5</version.gpg.plugin>
7979
<version.install.plugin>2.5.2</version.install.plugin>
8080
<version.jacoco.plugin>0.8.10</version.jacoco.plugin>
81+
<version.japicmp.plugin>0.20.0</version.japicmp.plugin>
8182
<version.javadoc.plugin>3.4.0</version.javadoc.plugin>
8283
<version.source.plugin>3.2.1</version.source.plugin>
8384
<version.jar.plugin>3.3.0</version.jar.plugin>
84-
<version.surefire.plugin>3.0.0-M7</version.surefire.plugin> <!-- Versions prior to 3.0.x do not pick up Junit 5 tests correctly. -->
85+
<version.surefire.plugin>3.2.5</version.surefire.plugin>
8586
<version.nexus-staging.plugin>1.6.7</version.nexus-staging.plugin>
8687
</properties>
8788

@@ -179,10 +180,16 @@
179180
</dependency>
180181

181182
<!-- PH -->
183+
<dependency>
184+
<groupId>com.sun.xml.bind</groupId>
185+
<artifactId>jaxb-impl</artifactId>
186+
<version>${version.jaxb-impl}</version>
187+
<scope>runtime</scope>
188+
</dependency>
182189
<dependency>
183190
<groupId>com.helger.commons</groupId>
184-
<artifactId>ph-commons</artifactId>
185-
<version>${version.ph}</version>
191+
<artifactId>ph-jaxb</artifactId>
192+
<version>${version.ph-jaxb}</version>
186193
</dependency>
187194
<dependency>
188195
<!-- For genericode .gc files (SDK codelist related) -->
@@ -209,11 +216,6 @@
209216
<artifactId>logback-core</artifactId>
210217
<version>${version.logback}</version>
211218
</dependency>
212-
<dependency>
213-
<groupId>com.google.code.findbugs</groupId>
214-
<artifactId>jsr305</artifactId>
215-
<version>${version.jsr305}</version>
216-
</dependency>
217219
<dependency>
218220
<groupId>org.antlr</groupId>
219221
<artifactId>antlr4-runtime</artifactId>
@@ -320,9 +322,13 @@
320322
</dependency>
321323

322324
<!-- PH -->
325+
<dependency>
326+
<groupId>com.sun.xml.bind</groupId>
327+
<artifactId>jaxb-impl</artifactId>
328+
</dependency>
323329
<dependency>
324330
<groupId>com.helger.commons</groupId>
325-
<artifactId>ph-commons</artifactId>
331+
<artifactId>ph-jaxb</artifactId>
326332
</dependency>
327333
<dependency>
328334
<!-- For genericode .gc files (SDK codelist related) -->
@@ -341,11 +347,6 @@
341347
<artifactId>logback-core</artifactId>
342348
<scope>test</scope>
343349
</dependency>
344-
<dependency>
345-
<groupId>com.google.code.findbugs</groupId>
346-
<artifactId>jsr305</artifactId>
347-
<scope>provided</scope>
348-
</dependency>
349350
<dependency>
350351
<groupId>org.antlr</groupId>
351352
<artifactId>antlr4-runtime</artifactId>
@@ -414,6 +415,11 @@
414415
<artifactId>jacoco-maven-plugin</artifactId>
415416
<version>${version.jacoco.plugin}</version>
416417
</plugin>
418+
<plugin>
419+
<groupId>com.github.siom79.japicmp</groupId>
420+
<artifactId>japicmp-maven-plugin</artifactId>
421+
<version>${version.japicmp.plugin}</version>
422+
</plugin>
417423
<plugin>
418424
<groupId>org.sonatype.plugins</groupId>
419425
<artifactId>nexus-staging-maven-plugin</artifactId>
@@ -478,6 +484,28 @@
478484
</execution>
479485
</executions>
480486
</plugin>
487+
488+
<plugin>
489+
<groupId>com.github.siom79.japicmp</groupId>
490+
<artifactId>japicmp-maven-plugin</artifactId>
491+
<configuration>
492+
<!-- Old and new versions are not specified, so we compare the latest released version with the build artefact -->
493+
<parameter>
494+
<!-- Break the build in case the semantic versioning is violated -->
495+
<breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning>
496+
<!-- Output only modified classes/methods in the report -->
497+
<onlyModified>true</onlyModified>
498+
</parameter>
499+
</configuration>
500+
<executions>
501+
<execution>
502+
<phase>verify</phase>
503+
<goals>
504+
<goal>cmp</goal>
505+
</goals>
506+
</execution>
507+
</executions>
508+
</plugin>
481509
</plugins>
482510
</build>
483511

src/main/java/eu/europa/ted/eforms/sdk/component/SdkComponent.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@
1313
public String[] versions();
1414

1515
public SdkComponentType componentType();
16+
17+
public String qualifier() default "";
1618
}

src/main/java/eu/europa/ted/eforms/sdk/component/SdkComponentDescriptor.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,20 @@ public class SdkComponentDescriptor<T> implements Serializable {
2323

2424
private SdkComponentType componentType;
2525

26+
private String qualifier;
27+
2628
private Class<T> implType;
2729

2830
public SdkComponentDescriptor(String sdkVersion, SdkComponentType componentType,
2931
Class<T> implType) {
32+
this(sdkVersion, componentType, "", implType);
33+
}
34+
35+
public SdkComponentDescriptor(String sdkVersion, SdkComponentType componentType, String qualifier,
36+
Class<T> implType) {
3037
this.sdkVersion = Validate.notBlank(sdkVersion, "Undefined SDK version");
3138
this.componentType = Validate.notNull(componentType, "Undefined component type");
39+
this.qualifier = Validate.notNull(qualifier, "Undefined qualifier");
3240
this.implType = Validate.notNull(implType, "Undefined implementation type");
3341
}
3442

@@ -94,7 +102,7 @@ private boolean constructorHasExpectedParameters(Constructor<?> constructor,
94102

95103
@Override
96104
public int hashCode() {
97-
return Objects.hash(componentType, sdkVersion);
105+
return Objects.hash(componentType, sdkVersion, qualifier, implType);
98106
}
99107

100108
@Override
@@ -106,7 +114,10 @@ public boolean equals(Object obj) {
106114
if (getClass() != obj.getClass())
107115
return false;
108116
SdkComponentDescriptor<?> other = (SdkComponentDescriptor<?>) obj;
109-
return componentType == other.componentType && Objects.equals(sdkVersion, other.sdkVersion);
117+
return componentType == other.componentType
118+
&& Objects.equals(sdkVersion, other.sdkVersion)
119+
&& Objects.equals(qualifier, other.qualifier)
120+
&& Objects.equals(implType, other.implType);
110121
}
111122

112123
public Class<T> getImplType() {

0 commit comments

Comments
 (0)