Skip to content

Commit 40faa4d

Browse files
Merge pull request #72 from OP-TED/release/1.14.0
Prepare release of version 1.14.0
2 parents 565469a + 92fd56c commit 40faa4d

23 files changed

Lines changed: 245 additions & 52 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
with:
2929
java-version: '11'
3030
distribution: 'adopt'
31-
server-id: ossrh
31+
server-id: central
3232
server-username: MAVEN_USERNAME
3333
server-password: MAVEN_PASSWORD
3434
- name: Publish to the Maven Central Repository

pom.xml

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>eu.europa.ted.eforms</groupId>
66
<artifactId>eforms-sdk-analyzer</artifactId>
7-
<version>1.13.1</version>
7+
<version>1.14.0</version>
88
<packaging>kjar</packaging>
99

1010
<name>eForms SDK Analyzer</name>
@@ -36,22 +36,9 @@
3636
<url>https://github.com/OP-TED/eforms-sdk-analyzer</url>
3737
</scm>
3838

39-
<distributionManagement>
40-
<snapshotRepository>
41-
<id>ossrh</id>
42-
<url>https://${sonatype.server.url}/content/repositories/snapshots</url>
43-
</snapshotRepository>
44-
<repository>
45-
<id>ossrh</id>
46-
<url>https://${sonatype.server.url}/service/local/staging/deploy/maven2/</url>
47-
</repository>
48-
</distributionManagement>
49-
5039
<properties>
5140
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
52-
<project.build.outputTimestamp>2025-03-03T15:39:33Z</project.build.outputTimestamp>
53-
54-
<sonatype.server.url>s01.oss.sonatype.org</sonatype.server.url>
41+
<project.build.outputTimestamp>2025-11-28T08:07:06Z</project.build.outputTimestamp>
5542

5643
<java.version>11</java.version>
5744

@@ -64,16 +51,16 @@
6451

6552
<!-- Version - Third-party libraries -->
6653
<version.commons-collections4>4.4</version.commons-collections4>
67-
<version.commons-lang3>3.12.0</version.commons-lang3>
54+
<version.commons-lang3>3.19.0</version.commons-lang3>
6855
<version.cucumber>7.11.1</version.cucumber>
6956
<version.drools>8.44.2.Final</version.drools>
7057
<version.istack>3.0.11</version.istack>
71-
<version.jackson>2.14.1</version.jackson>
58+
<version.jackson>2.19.0</version.jackson>
7259
<version.jaxb-bind-api>4.0.0</version.jaxb-bind-api>
7360
<version.jaxb-impl>4.0.4</version.jaxb-impl>
7461
<version.jmh>1.37</version.jmh>
7562
<version.junit>5.9.2</version.junit>
76-
<version.logback>1.4.14</version.logback>
63+
<version.logback>1.5.21</version.logback>
7764
<version.maven-model>3.9.1</version.maven-model>
7865
<version.picocli>4.6.3</version.picocli>
7966
<version.ph-schematron>8.0.3</version.ph-schematron>
@@ -89,7 +76,7 @@
8976
<version.javadoc.plugin>3.10.0</version.javadoc.plugin>
9077
<version.source.plugin>3.3.1</version.source.plugin>
9178
<version.surefire.plugin>3.2.5</version.surefire.plugin>
92-
<version.nexus-staging.plugin>1.6.14</version.nexus-staging.plugin>
79+
<version.central-publishing.plugin>0.8.0</version.central-publishing.plugin>
9380
</properties>
9481

9582
<dependencyManagement>
@@ -399,9 +386,9 @@
399386

400387
<repositories>
401388
<repository>
402-
<id>oss-snapshots</id>
403-
<name>OSS Snapshots repository</name>
404-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
389+
<id>central-snapshots</id>
390+
<name>Central Snapshots repository</name>
391+
<url>https://central.sonatype.com/repository/maven-snapshots</url>
405392
<releases>
406393
<enabled>false</enabled>
407394
</releases>
@@ -453,9 +440,9 @@
453440
<version>${version.drools}</version>
454441
</plugin>
455442
<plugin>
456-
<groupId>org.sonatype.plugins</groupId>
457-
<artifactId>nexus-staging-maven-plugin</artifactId>
458-
<version>${version.nexus-staging.plugin}</version>
443+
<groupId>org.sonatype.central</groupId>
444+
<artifactId>central-publishing-maven-plugin</artifactId>
445+
<version>${version.central-publishing.plugin}</version>
459446
</plugin>
460447
</plugins>
461448
</pluginManagement>
@@ -593,16 +580,15 @@
593580
</gpgArguments>
594581
</configuration>
595582
</plugin>
596-
<plugin>
597-
<groupId>org.sonatype.plugins</groupId>
598-
<artifactId>nexus-staging-maven-plugin</artifactId>
599-
<extensions>true</extensions>
600-
<configuration>
601-
<serverId>ossrh</serverId>
602-
<nexusUrl>https://${sonatype.server.url}/</nexusUrl>
603-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
604-
</configuration>
605-
</plugin>
583+
<plugin>
584+
<groupId>org.sonatype.central</groupId>
585+
<artifactId>central-publishing-maven-plugin</artifactId>
586+
<extensions>true</extensions>
587+
<configuration>
588+
<publishingServerId>central</publishingServerId>
589+
<autoPublish>true</autoPublish>
590+
</configuration>
591+
</plugin>
606592
</plugins>
607593
</build>
608594
</profile>

src/main/java/eu/europa/ted/eforms/sdk/analysis/FactsLoader.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import eu.europa.ted.eforms.sdk.analysis.fact.SvrlReportFact;
3838
import eu.europa.ted.eforms.sdk.analysis.fact.TranslationsIndexFact;
3939
import eu.europa.ted.eforms.sdk.analysis.fact.ViewTemplateFact;
40+
import eu.europa.ted.eforms.sdk.analysis.fact.ViewTemplatesIndexFact;
4041
import eu.europa.ted.eforms.sdk.analysis.fact.XmlNoticeFact;
4142

4243
public class FactsLoader {
@@ -147,6 +148,17 @@ public DataStore<ViewTemplateFact> loadViewTemplates() throws IOException {
147148
return datastore;
148149
}
149150

151+
public DataStore<ViewTemplatesIndexFact> loadViewTemplatesIndex() throws IOException {
152+
logger.debug("Creating facts datastore for view templates index");
153+
154+
TedefoViewTemplatesIndex viewTemplatesIndex = sdkLoader.getViewTemplatesIndex();
155+
156+
final DataStore<ViewTemplatesIndexFact> datastore = DataSource.createStore();
157+
datastore.add(new ViewTemplatesIndexFact(viewTemplatesIndex));
158+
159+
return datastore;
160+
}
161+
150162
public DataStore<DocumentTypeFact> loadDocumentTypes() throws IOException {
151163
logger.debug("Creating facts datastore for document types");
152164

src/main/java/eu/europa/ted/eforms/sdk/analysis/domain/field/Field.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"attributeName", "attributeOf", "attributes",
2424
"presetValue", "businessEntityId", "idSchemes", "idScheme", "schemeName", "referencedBusinessEntityIds",
2525
"legalType", "maxLength", "description",
26-
"privacy", "repeatable", "forbidden", "mandatory", "pattern", "rangeNumeric", "codeList",
26+
"privacy", "repeatable", "forbidden", "mandatory", "pattern", "numericRange", "codeList",
2727
"inChangeNotice", "inContinueProcedure", "assert"})
2828
public class Field implements Serializable {
2929
private static final long serialVersionUID = -1387933500392516298L;
@@ -68,7 +68,7 @@ public class Field implements Serializable {
6868
private BooleanProperty mandatory;
6969

7070
private StringProperty pattern;
71-
private RangeNumericProperty rangeNumeric;
71+
private RangeNumericProperty numericRange;
7272
private CodeListProperty codeList;
7373

7474
private ChangeableOrCpProperty inChangeNotice;
@@ -181,8 +181,8 @@ public StringProperty getPattern() {
181181
return pattern;
182182
}
183183

184-
public RangeNumericProperty getRangeNumeric() {
185-
return rangeNumeric;
184+
public RangeNumericProperty getNumericRange() {
185+
return numericRange;
186186
}
187187

188188
public CodeListProperty getCodeList() {

src/main/java/eu/europa/ted/eforms/sdk/analysis/domain/mdd/enums/NoticeLegalBasis.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@ public enum NoticeLegalBasis implements ILiteral {
1717

1818
_31985R2137("31985R2137"),
1919

20-
_32018R1046("32018R1046"),
21-
2220
_32024R2509("32024R2509"),
2321

24-
OTHER("other"),
25-
26-
UNKNOWN("unknown");
22+
OTHER("other");
2723

2824
private final String literal;
2925

src/main/java/eu/europa/ted/eforms/sdk/analysis/drools/SdkUnit.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import eu.europa.ted.eforms.sdk.analysis.fact.SchematronFileFact;
2222
import eu.europa.ted.eforms.sdk.analysis.fact.SvrlReportFact;
2323
import eu.europa.ted.eforms.sdk.analysis.fact.ViewTemplateFact;
24+
import eu.europa.ted.eforms.sdk.analysis.fact.ViewTemplatesIndexFact;
2425
import eu.europa.ted.eforms.sdk.analysis.fact.XmlNoticeFact;
2526
import eu.europa.ted.eforms.sdk.analysis.vo.SdkMetadata;
2627
import eu.europa.ted.eforms.sdk.analysis.vo.ValidationResult;
@@ -39,6 +40,7 @@ public class SdkUnit implements RuleUnit {
3940
private DataStore<NodeFact> nodes;
4041
private DataStore<NoticeTypesIndexFact> noticeTypesIndex;
4142
private DataStore<NoticeTypeFact> noticeTypes;
43+
private DataStore<ViewTemplatesIndexFact> viewTemplatesIndex;
4244
private DataStore<ViewTemplateFact> viewTemplates;
4345
private DataStore<SvrlReportFact> svrlReports;
4446
private DataStore<SchematronFileFact> schematrons;
@@ -153,6 +155,15 @@ public SdkUnit setNoticeTypes(DataStore<NoticeTypeFact> noticeTypes) {
153155
return this;
154156
}
155157

158+
public DataStore<ViewTemplatesIndexFact> getViewTemplatesIndex() {
159+
return viewTemplatesIndex;
160+
}
161+
162+
public SdkUnit setViewTemplatesIndex(DataStore<ViewTemplatesIndexFact> viewTemplatesIndex) {
163+
this.viewTemplatesIndex = viewTemplatesIndex;
164+
return this;
165+
}
166+
156167
public DataStore<ViewTemplateFact> getViewTemplates() {
157168
return viewTemplates;
158169
}

src/main/java/eu/europa/ted/eforms/sdk/analysis/fact/FieldFact.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public String getBusinessEntityId() {
185185
*/
186186
private Stream<AbstractFieldProperty<? extends AbstractConstraint<?>, ?>> getDynamicProperties() {
187187
return Stream.of(field.getRepeatable(), field.getForbidden(), field.getMandatory(),
188-
field.getCodeList(), field.getPattern(), field.getRangeNumeric(), field.getAssertion(),
188+
field.getCodeList(), field.getPattern(), field.getNumericRange(), field.getAssertion(),
189189
field.getInChangeNotice(), field.getInContinueProcedure());
190190
}
191191

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package eu.europa.ted.eforms.sdk.analysis.fact;
2+
3+
import java.util.Set;
4+
import java.util.stream.Collectors;
5+
6+
import org.apache.commons.lang3.StringUtils;
7+
8+
import eu.europa.ted.eforms.sdk.analysis.domain.view.index.TedefoViewTemplateIndex;
9+
import eu.europa.ted.eforms.sdk.analysis.domain.view.index.TedefoViewTemplatesIndex;
10+
11+
public class ViewTemplatesIndexFact implements SdkComponentFact<String> {
12+
13+
private final TedefoViewTemplatesIndex viewTemplatesIndex;
14+
15+
public ViewTemplatesIndexFact(TedefoViewTemplatesIndex viewTemplatesIndex) {
16+
this.viewTemplatesIndex = viewTemplatesIndex;
17+
}
18+
19+
public Set<String> getLabelIds() {
20+
return viewTemplatesIndex.getViewTemplates().stream()
21+
.map(TedefoViewTemplateIndex::getLabelId)
22+
.collect(Collectors.toSet());
23+
}
24+
25+
@Override
26+
public String getId() {
27+
return StringUtils.EMPTY;
28+
}
29+
30+
@Override
31+
public String getTypeName() {
32+
return "viewTemplatesIndex";
33+
}
34+
}

src/main/java/eu/europa/ted/eforms/sdk/analysis/validator/SdkValidator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public Validator validate() throws Exception {
6060
.setNoticeTypesIndex(factsLoader.loadNoticeTypesIndex())
6161
.setLabels(factsLoader.loadLabels())
6262
.setViewTemplates(factsLoader.loadViewTemplates())
63+
.setViewTemplatesIndex(factsLoader.loadViewTemplatesIndex())
6364
.setXmlNotices(factsLoader.loadXmlNotices())
6465
.setSvrlReports(factsLoader.loadSvrlReports())
6566
.setSchematrons(factsLoader.loadSchematrons());
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package eu.europa.ted.eforms.sdk.analysis.drools;
2+
3+
unit SdkUnit;
4+
5+
rule "View templates index references existing labels"
6+
when
7+
$labelId : /viewTemplatesIndex[ $v: this ]/labelIds
8+
not (exists /labels[ id == $labelId ])
9+
then
10+
results.add(new ValidationResult($v, "Referenced label " + $labelId + " does not exist", ValidationStatusEnum.ERROR));
11+
end

0 commit comments

Comments
 (0)