diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..8d2bff6
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,48 @@
+name: CI Build
+on:
+ pull_request:
+ push:
+ branches:
+ - main
+
+jobs:
+ build:
+ permissions:
+ contents: read # checkout
+ actions: read # needed for upload‑artifact
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+
+ - name: Setup Java
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '21'
+ cache: 'maven'
+
+ - name: Build with Maven
+ run: mvn clean install -DskipTests --no-transfer-progress
+
+ - name: Run Tests
+ run: |
+ mvn verify \
+ -Dsurefire.reportFormat=xml \
+ --no-transfer-progress
+
+ - name: Upload JUnit reports
+ if: always()
+ uses: actions/upload-artifact@v7
+ with:
+ name: junit-reports
+ path: target/surefire-reports/*.xml
+
+ - name: Upload JaCoCo coverage
+ if: always()
+ uses: actions/upload-artifact@v7
+ with:
+ name: jacoco-report
+ path: target/site/jacoco/**
diff --git a/cli/pom.xml b/cli/pom.xml
index 62c33ec..bcd7270 100644
--- a/cli/pom.xml
+++ b/cli/pom.xml
@@ -5,7 +5,7 @@
referencevalidator
de.gematik.refv
- 2.15.0
+ 3.0.0-SNAPSHOT
${basedir}/target/test-classes/pluginloader-integration-test
@@ -107,10 +107,6 @@
info.picocli
picocli
-
- commons-io
- commons-io
-
org.slf4j
slf4j-api
diff --git a/commons/pom.xml b/commons/pom.xml
index 4914447..14030d2 100644
--- a/commons/pom.xml
+++ b/commons/pom.xml
@@ -5,7 +5,7 @@
referencevalidator
de.gematik.refv
- 2.15.0
+ 3.0.0-SNAPSHOT
4.0.0
@@ -61,5 +61,13 @@
+
+ ca.uhn.hapi.fhir
+ hapi-fhir-caching-caffeine
+
+
+ ch.qos.logback
+ logback-classic
+
\ No newline at end of file
diff --git a/commons/src/main/java/de/gematik/refv/commons/Profile.java b/commons/src/main/java/de/gematik/refv/commons/Profile.java
index 82852f7..cf1b5f2 100644
--- a/commons/src/main/java/de/gematik/refv/commons/Profile.java
+++ b/commons/src/main/java/de/gematik/refv/commons/Profile.java
@@ -48,9 +48,9 @@ public static Profile parse(String canonical) {
String[] splittedString = canonical.split("\\|");
if (splittedString.length < 2) {
return new Profile(canonical, splittedString[0], null);
- } else {
- return new Profile(canonical, splittedString[0], splittedString[1]);
}
+
+ return new Profile(canonical, splittedString[0], splittedString[1]);
}
@Override
diff --git a/commons/src/main/java/de/gematik/refv/commons/configuration/ValidationModuleConfiguration.java b/commons/src/main/java/de/gematik/refv/commons/configuration/ValidationModuleConfiguration.java
index 8f91266..be0984a 100644
--- a/commons/src/main/java/de/gematik/refv/commons/configuration/ValidationModuleConfiguration.java
+++ b/commons/src/main/java/de/gematik/refv/commons/configuration/ValidationModuleConfiguration.java
@@ -129,12 +129,12 @@ public Profile findFirstSupportedProfileWithExistingConfiguration(List p
profiles.stream()
.map(Profile::parse)
.filter(profile -> getSupportedProfileConfiguration(profile).isPresent())
- .collect(Collectors.toList());
+ .toList();
if (supportedProfilesFound.isEmpty()) return null;
if (supportedProfilesFound.size() > 1)
log.warn(
"Multiple supported profiles found. Selecting the first one for further processing: {}",
- supportedProfilesFound.get(0));
- return supportedProfilesFound.get(0);
+ supportedProfilesFound.getFirst());
+ return supportedProfilesFound.getFirst();
}
}
diff --git a/commons/src/main/java/de/gematik/refv/commons/validation/BundleValidationModule.java b/commons/src/main/java/de/gematik/refv/commons/validation/BundleValidationModule.java
index 304ded5..ed6710e 100644
--- a/commons/src/main/java/de/gematik/refv/commons/validation/BundleValidationModule.java
+++ b/commons/src/main/java/de/gematik/refv/commons/validation/BundleValidationModule.java
@@ -51,9 +51,10 @@ class BundleValidationModule implements IValidatorModule {
@Override
public void validateResource(IValidationContext iValidationContext) {
var resource = iValidationContext.getResource();
- if (!(resource instanceof Bundle)) return;
+ if (!(resource instanceof Bundle bundle)) {
+ return;
+ }
- var bundle = (Bundle) resource;
var i = 0;
for (var entry : bundle.getEntry()) {
String fullUrl = entry.getFullUrl();
diff --git a/commons/src/main/java/de/gematik/refv/commons/validation/GenericValidator.java b/commons/src/main/java/de/gematik/refv/commons/validation/GenericValidator.java
index ceb7cd6..2d0aebc 100644
--- a/commons/src/main/java/de/gematik/refv/commons/validation/GenericValidator.java
+++ b/commons/src/main/java/de/gematik/refv/commons/validation/GenericValidator.java
@@ -103,7 +103,7 @@ public ValidationResult validate(
ValidationResult result;
var configuration = resourceProvider.getConfiguration();
- if (!validateEncoding(resourceBody, configuration, validationOptions))
+ if (!validateEncoding(resourceBody, configuration, validationOptions)) {
result =
ValidationResult.createInstance(
ResultSeverityEnum.ERROR,
@@ -111,7 +111,7 @@ public ValidationResult validate(
String.format(
"Wrong instance encoding. Allowed encodings: %s",
String.join(",", getAcceptedEncodings(configuration, validationOptions))));
- else {
+ } else {
List allReferencedProfilesInResource =
referencedProfileLocator.getAllReferencedProfilesInResource(resourceBody);
@@ -131,21 +131,23 @@ && noneReferencedProfileMatches(
var userDefinedProfile =
validationOptions
.getProfiles()
- .get(0); // Only one user defined profile is supported at the moment
+ .getFirst(); // Only one user defined profile is supported at the moment
log.warn("Profile for validation has been passed by user: " + userDefinedProfile);
profileForValidation =
configuration.findFirstSupportedProfileWithExistingConfiguration(
List.of(userDefinedProfile));
- } else if (!allReferencedProfilesInResource.isEmpty())
+ } else if (!allReferencedProfilesInResource.isEmpty()) {
profileForValidation =
configuration.findFirstSupportedProfileWithExistingConfiguration(
allReferencedProfilesInResource);
- else
+ } else {
throw new IllegalArgumentException(
"FHIR resources without a referenced profile are currently unsupported. Please provide a profile parameter or a profile in the resource meta.profile element.");
+ }
- if (profileForValidation == null)
+ if (profileForValidation == null) {
throw new UnsupportedProfileException(allReferencedProfilesInResource);
+ }
result =
validateResource(
@@ -179,11 +181,12 @@ private ValidationResult validateResource(
var profileConfigurationOptional =
configuration.getSupportedProfileConfiguration(profileForValidation);
- if (profileConfigurationOptional.isEmpty())
+ if (profileConfigurationOptional.isEmpty()) {
// Profile is listed among supported profiles, but there are no dependency lists defined -->
// corrupted module configuration
throw new IllegalStateException(
String.format("Could not retrieve profile configuration for %s", profileForValidation));
+ }
ProfileConfiguration profileConfiguration = profileConfigurationOptional.get();
@@ -296,15 +299,19 @@ private boolean validateEncoding(
de.gematik.refv.commons.validation.ValidationOptions validationOptions) {
List acceptedEncodings = getAcceptedEncodings(configuration, validationOptions);
- if (acceptedEncodings.isEmpty()) return true;
+ if (acceptedEncodings.isEmpty()) {
+ return true;
+ }
EncodingEnum encoding = EncodingEnum.detectEncodingNoDefault(resourceBody);
- if (acceptedEncodings.contains(Constants.FORMAT_XML) && encoding == EncodingEnum.XML)
+ if (acceptedEncodings.contains(Constants.FORMAT_XML) && encoding == EncodingEnum.XML) {
return true;
+ }
- if (acceptedEncodings.contains(Constants.FORMAT_JSON) && encoding == EncodingEnum.JSON)
+ if (acceptedEncodings.contains(Constants.FORMAT_JSON) && encoding == EncodingEnum.JSON) {
return true;
+ }
log.warn("Unknown resource encoding: {}", encoding);
return false;
diff --git a/commons/src/main/java/de/gematik/refv/commons/validation/HapiFhirValidatorFactory.java b/commons/src/main/java/de/gematik/refv/commons/validation/HapiFhirValidatorFactory.java
index 9445152..7ad92ac 100644
--- a/commons/src/main/java/de/gematik/refv/commons/validation/HapiFhirValidatorFactory.java
+++ b/commons/src/main/java/de/gematik/refv/commons/validation/HapiFhirValidatorFactory.java
@@ -34,7 +34,6 @@
import java.util.Collection;
import lombok.NonNull;
import lombok.SneakyThrows;
-import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport;
import org.hl7.fhir.common.hapi.validation.support.SnapshotGeneratingValidationSupport;
import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain;
import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator;
@@ -66,7 +65,10 @@ private FhirValidator createHapiFhirValidator(
ValidationModuleConfiguration configuration, ValidationSupportChain validationSupportChain) {
FhirInstanceValidator hapiValidatorModule = new FhirInstanceValidator(validationSupportChain);
hapiValidatorModule.setErrorForUnknownProfiles(configuration.isErrorOnUnknownProfile());
- hapiValidatorModule.setNoExtensibleWarnings(true);
+ hapiValidatorModule.setNoExtensibleWarnings(
+ Boolean.parseBoolean(System.getenv().getOrDefault("DISABLE_EXTENSIBLE_WARNINGS", "true")));
+ hapiValidatorModule.setNoTerminologyChecks(
+ Boolean.parseBoolean(System.getenv().getOrDefault("DISABLE_TERMINOLOGY_CHECKS", "false")));
hapiValidatorModule.setAnyExtensionsAllowed(configuration.isAnyExtensionsAllowed());
FhirValidator fhirValidator = fhirContext.newValidator();
fhirValidator.registerValidatorModule(hapiValidatorModule);
@@ -91,12 +93,9 @@ private ValidationSupportChain createValidationSupportChain(
return new ValidationSupportChain(
new UcumValidationSupport(fhirContext, configuration.getUcumValidationSeverityLevel()),
new SnapshotGeneratingValidationSupport(fhirContext),
- new CachingValidationSupport(
- new IgnoreCodeSystemValidationSupport(
- fhirContext, configuration.getIgnoredCodeSystems())),
- new CachingValidationSupport(
- new IgnoreValueSetValidationSupport(fhirContext, configuration.getIgnoredValueSets())),
- new CachingValidationSupport(validationSupport),
+ new IgnoreCodeSystemValidationSupport(fhirContext, configuration.getIgnoredCodeSystems()),
+ new IgnoreValueSetValidationSupport(fhirContext, configuration.getIgnoredValueSets()),
+ validationSupport,
new PipedCanonicalCoreResourcesValidationSupport(fhirContext));
}
}
diff --git a/commons/src/main/java/de/gematik/refv/commons/validation/ReferencedProfileLocator.java b/commons/src/main/java/de/gematik/refv/commons/validation/ReferencedProfileLocator.java
index 8a3707e..37d121d 100644
--- a/commons/src/main/java/de/gematik/refv/commons/validation/ReferencedProfileLocator.java
+++ b/commons/src/main/java/de/gematik/refv/commons/validation/ReferencedProfileLocator.java
@@ -66,7 +66,9 @@ public List getAllReferencedProfilesInResource(String resourceBody) {
} catch (IOException e) {
throw new IllegalArgumentException("Could not parse resource", e);
}
- } else allProfilesInResource = locateInXml(resourceBody);
+ } else {
+ allProfilesInResource = locateInXml(resourceBody);
+ }
return allProfilesInResource;
}
@@ -80,7 +82,9 @@ private List locateInXml(String resource) throws IllegalArgumentExceptio
while (xmlEventReader.hasNext()) {
XMLEvent event = xmlEventReader.nextEvent();
- if (event instanceof DTD) throw new SecurityException("DTD is not allowed");
+ if (event instanceof DTD) {
+ throw new SecurityException("DTD is not allowed");
+ }
if (event.isStartElement()) {
treeLevel++;
@@ -151,7 +155,9 @@ private void parseXmlEventsForProfiles(XMLEventReader xmlEventReader, List locateInJson(String resource) throws IOException {
int treeLevel = 0;
var token = jsonParser.nextToken();
while (jsonParser.hasCurrentToken()) {
- if (token.isStructStart()) treeLevel++;
- else if (token.isStructEnd()) treeLevel--;
- else {
+ if (token.isStructStart()) {
+ treeLevel++;
+ } else if (token.isStructEnd()) {
+ treeLevel--;
+ } else {
if (treeLevel <= 2) {
String fieldName = jsonParser.currentName();
if ("meta".equals(fieldName)) {
diff --git a/commons/src/main/java/de/gematik/refv/commons/validation/ValidationResultOutputFilter.java b/commons/src/main/java/de/gematik/refv/commons/validation/ValidationResultOutputFilter.java
index 461f99e..fb712f7 100644
--- a/commons/src/main/java/de/gematik/refv/commons/validation/ValidationResultOutputFilter.java
+++ b/commons/src/main/java/de/gematik/refv/commons/validation/ValidationResultOutputFilter.java
@@ -30,7 +30,9 @@
class ValidationResultOutputFilter {
public ValidationResult apply(
ValidationResult result, ValidationMessagesFilter validationMessagesFilter) {
- if (validationMessagesFilter == ValidationMessagesFilter.KEEP_ALL) return result;
+ if (validationMessagesFilter == ValidationMessagesFilter.KEEP_ALL) {
+ return result;
+ }
if (validationMessagesFilter == ValidationMessagesFilter.KEEP_ERRORS_AND_WARNINGS_ONLY) {
var filteredMessages =
diff --git a/commons/src/main/java/de/gematik/refv/commons/validation/support/PipedCanonicalCoreResourcesValidationSupport.java b/commons/src/main/java/de/gematik/refv/commons/validation/support/PipedCanonicalCoreResourcesValidationSupport.java
index a4ca20e..0a9d5a7 100644
--- a/commons/src/main/java/de/gematik/refv/commons/validation/support/PipedCanonicalCoreResourcesValidationSupport.java
+++ b/commons/src/main/java/de/gematik/refv/commons/validation/support/PipedCanonicalCoreResourcesValidationSupport.java
@@ -42,14 +42,19 @@ public PipedCanonicalCoreResourcesValidationSupport(FhirContext ctx) {
@Override
public IBaseResource fetchStructureDefinition(String theUrl) {
Profile p = Profile.parse(theUrl);
- if (p.getVersion() == null) return null;
+ if (p.getVersion() == null) {
+ return null;
+ }
IValidationSupport support = ctx.getValidationSupport();
IBaseResource resource = support.fetchStructureDefinition(p.getBaseCanonical());
- if (resource == null) return null;
+ if (resource == null) {
+ return null;
+ }
- if (Strings.CS.equals(((StructureDefinition) resource).getVersion(), p.getVersion()))
+ if (Strings.CS.equals(((StructureDefinition) resource).getVersion(), p.getVersion())) {
return resource;
+ }
return null;
}
diff --git a/commons/src/main/java/de/gematik/refv/commons/validation/support/UcumValidationSupport.java b/commons/src/main/java/de/gematik/refv/commons/validation/support/UcumValidationSupport.java
index a375ddb..4b1f452 100644
--- a/commons/src/main/java/de/gematik/refv/commons/validation/support/UcumValidationSupport.java
+++ b/commons/src/main/java/de/gematik/refv/commons/validation/support/UcumValidationSupport.java
@@ -41,13 +41,14 @@
@Slf4j
public class UcumValidationSupport implements IValidationSupport {
- private FhirContext fhirContext;
+ private final FhirContext fhirContext;
- private IssueSeverity issueSeverity;
+ private final IssueSeverity issueSeverity;
public UcumValidationSupport(FhirContext theFhirContext, IssueSeverity issueSeverity) {
this.fhirContext = theFhirContext;
- this.issueSeverity = issueSeverity;
+ this.issueSeverity = issueSeverity != null ? issueSeverity : IssueSeverity.ERROR;
+ ;
}
@Override
@@ -113,8 +114,9 @@ public CodeValidationResult validateCode(
String theValueSetUrl) {
LookupCodeResult lookupResult =
lookupCode(theValidationSupportContext, theCodeSystem, theCode, null);
- if (lookupResult.isFound())
+ if (lookupResult != null && lookupResult.isFound()) {
return new CodeValidationResult().setCode(theCode).setDisplay(lookupResult.getCodeDisplay());
+ }
// The presence of only the following two attributes is important to make sure the code
// validation will result in a Warning or an Error
diff --git a/commons/src/main/resources/logback.xml b/commons/src/main/resources/logback.xml
new file mode 100644
index 0000000..152350f
--- /dev/null
+++ b/commons/src/main/resources/logback.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+ [%d{ISO8601}] [%p] [%t] [%c] %m%n
+
+
+
+
+
+
+
+
diff --git a/commons/src/test/java/de/gematik/refv/commons/validation/BundlesIT.java b/commons/src/test/java/de/gematik/refv/commons/validation/BundlesIT.java
index a3fa9e0..bba9306 100644
--- a/commons/src/test/java/de/gematik/refv/commons/validation/BundlesIT.java
+++ b/commons/src/test/java/de/gematik/refv/commons/validation/BundlesIT.java
@@ -27,10 +27,12 @@
import de.gematik.refv.commons.helper.ValidationModuleFactory;
import java.io.IOException;
import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
+@Slf4j
class BundlesIT {
private static ValidationModule validationModule;
@@ -54,6 +56,14 @@ private static void assertInvalidAndThatMessageIdIsReturned(String path, String
throws IOException {
var result = validationModule.validateFile(path);
Assertions.assertFalse(result.isValid(), result.toString());
+ result
+ .getValidationMessages()
+ .forEach(
+ singleValidationMessage ->
+ log.info(
+ "{} - {}",
+ singleValidationMessage.getMessageId(),
+ singleValidationMessage.getMessage()));
Assertions.assertTrue(
result.getValidationMessages().stream().anyMatch(m -> m.getMessageId().equals(messageId)),
"Expected error not found");
@@ -88,16 +98,22 @@ void validForPartiallyOrphanedEntries() {
@Test
@SneakyThrows
void validForMismatchingRelativeAndAbsoluteUrlsEvenIfTargetProfileDoesntMatch() {
- assertValidAndThatMessageIdIsReturned(
+ // REFV-207
+ // the original bundle contains invalid references, so the validator triggers errors
+ // TESTCHANGE
+ assertInvalidAndThatMessageIdIsReturned(
"src/test/resources/bundles/valid/Target_Profiles_Are_Not_Validated_If_Local_References_Do_Not_Match_Full_URLs.xml",
- "BUNDLE_BUNDLE_POSSIBLE_MATCH_WRONG_FU");
+ "BUNDLE_BUNDLE_ENTRY_NOTFOUND_CANNOT");
}
@Test
@SneakyThrows
void validForMixedURNsAndURLs() {
- assertValidAndThatMessageIdIsReturned(
+ // REFV-207
+ // the original bundle contains invalid references, so the validator triggers errors
+ // TESTCHANGE
+ assertInvalidAndThatMessageIdIsReturned(
"src/test/resources/bundles/valid/Mix_Of_URNs_And_URLs_In_Full_URLs.xml",
- "BUNDLE_BUNDLE_POSSIBLE_MATCH_WRONG_FU");
+ "BUNDLE_BUNDLE_ENTRY_NOTFOUND_CANNOT");
}
}
diff --git a/commons/src/test/java/de/gematik/refv/commons/validation/IntegratedValidationModuleIT.java b/commons/src/test/java/de/gematik/refv/commons/validation/IntegratedValidationModuleIT.java
index 986f642..cf7648a 100644
--- a/commons/src/test/java/de/gematik/refv/commons/validation/IntegratedValidationModuleIT.java
+++ b/commons/src/test/java/de/gematik/refv/commons/validation/IntegratedValidationModuleIT.java
@@ -121,29 +121,6 @@ void testXmlIsNotAcceptedIfValidationOptionIsPassed() {
result.isValid(), "XML has been accepted while it shouldn't - explicitely set as option");
}
- /**
- * An XML-comment in front of a resource leads to anomalous behavior while validating
- * terminologies. E.g. if some code doesn't come from the "preferred" ValueSet, misleading
- * validation messages occur. This seems to be a bug in the current version of HAPI (6.6.2) A
- * comment-stripping mechanism in the reference validator ensures, that these messages get
- * suppressed.
- */
- @Test
- @SneakyThrows
- void testXmlCommentsDoNotProduceMisleadingValidationIssues() {
- var input =
- ClasspathUtil.loadResourceAsStream(
- "classpath:" + "simplevalidationmodule.test.patient.valid.with-xml-comments.xml");
-
- ValidationOptions options = ValidationOptions.getDefaults();
- options.setValidationMessagesFilter(ValidationMessagesFilter.KEEP_ALL);
- var result = module.validateString(IOUtils.toString(input, StandardCharsets.UTF_8), options);
- Assertions.assertFalse(
- result.getValidationMessages().stream()
- .anyMatch(m -> m.getMessageId().equals("Terminology_TX_NoValid_3_CC")),
- "Misleading validation messages detected while there should be none");
- }
-
@Test
@SneakyThrows
void testProfileFilterWhichDoesntMatchAnyMetaProfileReference() {
diff --git a/commons/src/test/java/de/gematik/refv/commons/validation/ValidationResultToOperationOutcomeConverterTest.java b/commons/src/test/java/de/gematik/refv/commons/validation/ValidationResultToOperationOutcomeConverterTest.java
index 5cf97e0..efafad4 100644
--- a/commons/src/test/java/de/gematik/refv/commons/validation/ValidationResultToOperationOutcomeConverterTest.java
+++ b/commons/src/test/java/de/gematik/refv/commons/validation/ValidationResultToOperationOutcomeConverterTest.java
@@ -53,9 +53,14 @@ void testToOperationOutcomeWithErrors() {
.parseResource(
ClassLoader.getSystemClassLoader()
.getResourceAsStream("operationoutcome-invalid.json"));
- assertThat(expectedOperationOutcome)
+
+ assertThat(returnedOperationOutcome)
.usingRecursiveComparison()
+ // suppresses the generated meta information
+ // "ca.uhn.fhir.parser.BaseParser_RESOURCE_CREATED_BY_PARSER"=true
.ignoringFields("userData")
- .isEqualTo(returnedOperationOutcome);
+ // suppresses the extra information added in the Extension by HAPI
+ .ignoringFieldsMatchingRegexes(".*\\.extension")
+ .isEqualTo(expectedOperationOutcome);
}
}
diff --git a/commons/src/test/java/de/gematik/refv/commons/validation/ValidityPeriodIT.java b/commons/src/test/java/de/gematik/refv/commons/validation/ValidityPeriodIT.java
index b54edd4..6626130 100644
--- a/commons/src/test/java/de/gematik/refv/commons/validation/ValidityPeriodIT.java
+++ b/commons/src/test/java/de/gematik/refv/commons/validation/ValidityPeriodIT.java
@@ -26,9 +26,7 @@
import ca.uhn.fhir.validation.ResultSeverityEnum;
import de.gematik.refv.commons.helper.ValidationModuleFactory;
-import java.util.TimeZone;
import lombok.SneakyThrows;
-import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
@@ -42,26 +40,16 @@ class ValidityPeriodIT {
private static ValidationModule validationModule;
- static TimeZone systemTimeZone;
-
@BeforeAll
@SneakyThrows
static void beforeAll() {
- systemTimeZone = TimeZone.getDefault();
- // Simulate reference validator running on a misconfigured machine.
- // This is potentially dangerous, because the setting may influence other tests running in
- // parallel, but no better solution has been found yet
- TimeZone.setDefault(TimeZone.getTimeZone("Asia/Taipei"));
-
+ // REFV-207
+ // TESTCHANGE
+ // Initialization with false Timezone modifies the state of validation module
validationModule = ValidationModuleFactory.createInstance("simple");
validationModule.initialize();
}
- @AfterAll
- static void afterAll() {
- TimeZone.setDefault(systemTimeZone);
- }
-
@ParameterizedTest
@ValueSource(
strings = {
diff --git a/core/pom.xml b/core/pom.xml
index 9e24461..d66d716 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -5,7 +5,7 @@
referencevalidator
de.gematik.refv
- 2.15.0
+ 3.0.0-SNAPSHOT
4.0.0
@@ -24,11 +24,6 @@
valmodule-eau
${project.version}
-
- de.gematik.refv.commons
- commons
- ${project.version}
-
de.gematik.refv.valmodule
valmodule-core
@@ -40,25 +35,14 @@
${project.version}
- org.yaml
- snakeyaml
-
-
- com.fasterxml.jackson.dataformat
- jackson-dataformat-yaml
-
-
- com.fasterxml.jackson.core
- jackson-databind
+ de.gematik.refv.commons
+ commons
+ ${project.version}
com.fasterxml.jackson.core
jackson-annotations
-
- org.apache.commons
- commons-compress
-
\ No newline at end of file
diff --git a/core/src/main/java/de/gematik/refv/Plugin.java b/core/src/main/java/de/gematik/refv/Plugin.java
index 4445718..e49803b 100644
--- a/core/src/main/java/de/gematik/refv/Plugin.java
+++ b/core/src/main/java/de/gematik/refv/Plugin.java
@@ -91,7 +91,9 @@ public InputStream getResource(@NonNull String path) {
try (var filesStream = Files.walk(pluginFolder)) {
var file = filesStream.filter(p -> p.endsWith(path) && Files.isRegularFile(p)).findFirst();
- if (file.isEmpty()) return null;
+ if (file.isEmpty()) {
+ return null;
+ }
return Files.newInputStream(file.get());
}
diff --git a/pom.xml b/pom.xml
index fa07caa..f56d64d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,15 +6,15 @@
valmodule-base
valmodule-erp
valmodule-eau
- core
- valmodule-core
valmodule-erpta7
+ valmodule-core
+ core
de.gematik.refv
referencevalidator
pom
- 2.15.0
+ 3.0.0-SNAPSHOT
gematik Referenzvalidator
Der Referenzvalidator ermöglicht eine erweiterte Validierung von FHIR-Ressourcen, die in den
Anwendungen der Telematikinfrastruktur (TI) verwendet werden. Der Referenzvalidator liefert autoritative
@@ -72,18 +72,18 @@
UTF-8
UTF-8
- 11
- 11
- 11
+ 21
+ 21
+ 21
3.5.4
- 3.14.1
- 6.6.2
- 1.18.42
- 2.25.2
+ 3.15.0
+ 8.8.1
+ 1.18.44
+ 2.25.3
2.0.17
2.0.17
- 6.0.1
- 2.19.1
+ 6.0.3
+ 2.21.2
7.1.1
3.21.0
3.3.1
@@ -92,7 +92,7 @@
3.4.0
3.12.0
3.8.0
- 3.2.1
+ 3.3.0
4.7.7
0.8.14
3.5.4
@@ -100,7 +100,7 @@
3.6.2
3.4.0
2.5
- 2.7.0
+ 2.7.1
1.3.2
**/site/jacoco-it/jacoco.xml,**/site/jacoco/jacoco.xml
@@ -108,21 +108,23 @@
target/surefire-reports,target/failsafe-reports/
- 0.9.0
+ 0.10.0
3.2.8
3.27.7
- 0.6.0
- 2.46.1
+ 0.7.2
3.4.0
1.28.0
33.5.0-jre
3.1.3.RELEASE
- 3.52.1
- 1.20.0
- 2.45.0
+ 3.53.1
+ 1.21.0
+ 2.47.0
2.21.0
3.20.0
1.15.0
+ 2.13.2
+ 3.2.2
+ 1.5.32
@@ -140,7 +142,6 @@
-
org.jacoco
jacoco-maven-plugin
@@ -177,7 +178,13 @@
maven-compiler-plugin
${version.compiler}
- true
+ ${maven.compiler.release}
+
+
+ org.projectlombok
+ lombok
+
+
@@ -401,55 +408,36 @@
-
-
- org.slf4j
- slf4j-api
- ${version.slf4j-api}
- provided
-
-
- org.slf4j
- slf4j-reload4j
- ${version.slf4j-log4j}
- provided
-
-
- org.apache.logging.log4j
- log4j-core
- ${version.log4j2}
- provided
-
-
- org.apache.logging.log4j
- log4j-api
- ${version.log4j2}
- provided
-
-
- org.junit.jupiter
- junit-jupiter
- ${version.junit-jupiter-api}
- test
-
-
- org.projectlombok
- lombok
- provided
- ${version.lombok}
-
-
-
- org.assertj
- assertj-core
- ${assertj-core.version}
- test
-
-
-
-
+
+ com.fasterxml.jackson
+ jackson-bom
+ ${version.jackson}
+ pom
+ import
+
+
+ org.projectlombok
+ lombok
+ ${version.lombok}
+ provided
+
+
+ org.junit.jupiter
+ junit-jupiter
+ ${version.junit-jupiter-api}
+
+
+ org.assertj
+ assertj-core
+ ${assertj-core.version}
+
+
+ ch.qos.logback
+ logback-classic
+ ${logback.version}
+
-
org.slf4j
slf4j-api
@@ -601,11 +582,6 @@
woodstox-core
${version.woodstox}
-
- com.fasterxml.jackson.dataformat
- jackson-dataformat-yaml
- ${version.jackson}
-
info.picocli
picocli
@@ -616,9 +592,33 @@
snakeyaml
${version.snakeyaml}
+
+ com.github.ben-manes.caffeine
+ caffeine
+ ${caffeine.version}
+
+
+
+
+ org.projectlombok
+ lombok
+
+
+ org.junit.jupiter
+ junit-jupiter
+ test
+
+
+ org.assertj
+ assertj-core
+ ${assertj-core.version}
+ test
+
+
+
external
@@ -718,5 +718,6 @@
-Xms4g -Xmx6g -Dgwt.extraJvmArgs=-Xmx6g
+
diff --git a/snapshot-generator/pom.xml b/snapshot-generator/pom.xml
index 5429aaf..22d732f 100644
--- a/snapshot-generator/pom.xml
+++ b/snapshot-generator/pom.xml
@@ -6,16 +6,13 @@
de.gematik.refv
referencevalidator
- 2.15.0
+ 3.0.0-SNAPSHOT
snapshot-generator
- 11
- 11
- UTF-8
-
+
diff --git a/snapshot-generator/pom.xml.versionsBackup b/snapshot-generator/pom.xml.versionsBackup
deleted file mode 100644
index 023d3f6..0000000
--- a/snapshot-generator/pom.xml.versionsBackup
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
- 4.0.0
-
- de.gematik.refv
- referencevalidator
- 2.15.0-SNAPSHOT
-
-
- snapshot-generator
-
-
- 11
- 11
- UTF-8
-
-
-
-
-
- create-fhir-snapshots
-
-
-
- org.codehaus.mojo
- exec-maven-plugin
- ${version.exec-maven-plugin}
-
-
- erp
- compile
-
- java
-
-
-
- ../valmodule-erp/src/main/resources/erp/src-package/
- ../valmodule-erp/src/main/resources/erp/package/
- --tempDir=${project.basedir}/target/decompressed-packages/
- --packages=${packages}
-
-
-
-
- eau
- compile
-
- java
-
-
-
- ../valmodule-eau/src/main/resources/eau/src-package/
- ../valmodule-eau/src/main/resources/eau/package/
- --tempDir=${project.basedir}/target/decompressed-packages/
- --packages=${packages}
-
-
-
-
-
- de.gematik.refv.snapshots.SnapshotGeneratorCli
-
-
-
-
-
-
-
-
-
- de.gematik.fhir
- fhir-snapshots-package-generator-lib
- ${version.snapshot-generator}
-
-
- info.picocli
- picocli
-
-
- org.slf4j
- slf4j-api
- ${version.slf4j-api}
-
-
- org.slf4j
- slf4j-simple
- ${version.slf4j-api}
- runtime
-
-
- commons-io
- commons-io
-
-
-
-
\ No newline at end of file
diff --git a/valmodule-base/pom.xml b/valmodule-base/pom.xml
index 9980c95..56c563b 100644
--- a/valmodule-base/pom.xml
+++ b/valmodule-base/pom.xml
@@ -5,7 +5,7 @@
referencevalidator
de.gematik.refv
- 2.15.0
+ 3.0.0-SNAPSHOT
4.0.0
diff --git a/valmodule-core/pom.xml b/valmodule-core/pom.xml
index fb1a340..8fd6747 100644
--- a/valmodule-core/pom.xml
+++ b/valmodule-core/pom.xml
@@ -6,7 +6,7 @@
de.gematik.refv
referencevalidator
- 2.15.0
+ 3.0.0-SNAPSHOT
${project.groupId}:${project.artifactId}
@@ -15,8 +15,6 @@
valmodule-core
- 11
- 11
UTF-8
diff --git a/valmodule-eau/pom.xml b/valmodule-eau/pom.xml
index c317645..9d9dc16 100644
--- a/valmodule-eau/pom.xml
+++ b/valmodule-eau/pom.xml
@@ -5,7 +5,7 @@
referencevalidator
de.gematik.refv
- 2.15.0
+ 3.0.0-SNAPSHOT
4.0.0
diff --git a/valmodule-erp-perf-tests/pom.xml b/valmodule-erp-perf-tests/pom.xml
index 86cc650..0cad54b 100644
--- a/valmodule-erp-perf-tests/pom.xml
+++ b/valmodule-erp-perf-tests/pom.xml
@@ -4,7 +4,7 @@
de.gematik.refv
referencevalidator
- 2.15.0
+ 3.0.0-SNAPSHOT
de.gematik.fhir
diff --git a/valmodule-erp/pom.xml b/valmodule-erp/pom.xml
index a9dda08..24ebb31 100644
--- a/valmodule-erp/pom.xml
+++ b/valmodule-erp/pom.xml
@@ -5,7 +5,7 @@
referencevalidator
de.gematik.refv
- 2.15.0
+ 3.0.0-SNAPSHOT
4.0.0
diff --git a/valmodule-erp/src/test/java/de/gematik/refv/valmodule/erp/TimezoneIT.java b/valmodule-erp/src/test/java/de/gematik/refv/valmodule/erp/TimezoneIT.java
index 4cf598e..cf57e73 100644
--- a/valmodule-erp/src/test/java/de/gematik/refv/valmodule/erp/TimezoneIT.java
+++ b/valmodule-erp/src/test/java/de/gematik/refv/valmodule/erp/TimezoneIT.java
@@ -67,7 +67,7 @@ protected Stream testValidation() {
var allFiles =
Files.walk(Paths.get(String.format("src/test/resources/%s", DIR)))
.filter(path -> path.toString().endsWith(String.format(".%s", "xml")))
- .collect(Collectors.toList());
+ .toList();
var timeZones = List.of("Asia/Taipei", "Europe/Berlin", "America/Nome");
var allDynamicTests = new LinkedList();
@@ -75,7 +75,7 @@ protected Stream testValidation() {
for (var timezone : timeZones) {
allDynamicTests.add(
DynamicTest.dynamicTest(
- file.toString() + " in " + timezone, () -> validateFile(file, timezone)));
+ file + " in " + timezone, () -> validateFile(file, timezone)));
}
}
return allDynamicTests.stream();
diff --git a/valmodule-erpta7-perf-tests/pom.xml b/valmodule-erpta7-perf-tests/pom.xml
index f470ca4..d79eeb0 100644
--- a/valmodule-erpta7-perf-tests/pom.xml
+++ b/valmodule-erpta7-perf-tests/pom.xml
@@ -4,7 +4,7 @@
de.gematik.refv
referencevalidator
- 2.15.0
+ 3.0.0-SNAPSHOT
de.gematik.fhir
diff --git a/valmodule-erpta7/pom.xml b/valmodule-erpta7/pom.xml
index fc5c639..5fb78de 100644
--- a/valmodule-erpta7/pom.xml
+++ b/valmodule-erpta7/pom.xml
@@ -6,7 +6,7 @@
de.gematik.refv
referencevalidator
- 2.15.0
+ 3.0.0-SNAPSHOT
${project.groupId}:${project.artifactId}