From b36a6ce52b9f17151a8dfa8a54e419f6b8abcde7 Mon Sep 17 00:00:00 2001 From: Paul Bastide Date: Wed, 11 Sep 2019 15:02:07 -0400 Subject: [PATCH 1/2] Update build for OpenJDK 11 #46 Signed-off-by: Paul Bastide --- fhir-client/pom.xml | 4 ++++ fhir-examples/pom.xml | 15 +++++++++------ fhir-model/pom.xml | 4 ++++ .../notification/util/FHIRNotificationUtil.java | 4 +--- .../operation/registry/FHIROperationRegistry.java | 6 ++---- fhir-parent/pom.xml | 10 ++++++++++ fhir-persistence-jdbc/pom.xml | 4 ++++ fhir-swagger-generator/pom.xml | 4 ++++ fhir-tools/pom.xml | 2 +- 9 files changed, 39 insertions(+), 14 deletions(-) diff --git a/fhir-client/pom.xml b/fhir-client/pom.xml index 637bb12fb1d..f3058bd8f87 100644 --- a/fhir-client/pom.xml +++ b/fhir-client/pom.xml @@ -55,5 +55,9 @@ jsonassert test + + jakarta.xml.bind + jakarta.xml.bind-api + diff --git a/fhir-examples/pom.xml b/fhir-examples/pom.xml index c801b6c1dc2..a19a3e3e552 100644 --- a/fhir-examples/pom.xml +++ b/fhir-examples/pom.xml @@ -3,19 +3,21 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 fhir-examples + com.ibm.watson.health + 4.0.0-SNAPSHOT - - com.ibm.watson.health - fhir-parent - 4.0.0-SNAPSHOT - ../fhir-parent - + + UTF-8 + 1.8 + 1.8 + org.apache.maven.plugins maven-checkstyle-plugin + 4.0.0-SNAPSHOT true @@ -23,6 +25,7 @@ org.codehaus.mojo xml-maven-plugin + 1.0.2 true diff --git a/fhir-model/pom.xml b/fhir-model/pom.xml index bdd11c1a295..465aeae5b83 100644 --- a/fhir-model/pom.xml +++ b/fhir-model/pom.xml @@ -50,6 +50,10 @@ ${project.version} test + + jakarta.annotation + jakarta.annotation-api + diff --git a/fhir-notification/src/main/java/com/ibm/watson/health/fhir/notification/util/FHIRNotificationUtil.java b/fhir-notification/src/main/java/com/ibm/watson/health/fhir/notification/util/FHIRNotificationUtil.java index 1f2d1190bb9..7ac2bc61167 100644 --- a/fhir-notification/src/main/java/com/ibm/watson/health/fhir/notification/util/FHIRNotificationUtil.java +++ b/fhir-notification/src/main/java/com/ibm/watson/health/fhir/notification/util/FHIRNotificationUtil.java @@ -12,7 +12,6 @@ import javax.json.JsonObject; import javax.json.JsonObjectBuilder; import javax.json.JsonReader; -import javax.xml.bind.JAXBException; import com.ibm.watson.health.fhir.exception.FHIRException; import com.ibm.watson.health.fhir.model.util.FHIRUtil; @@ -37,10 +36,9 @@ public static FHIRNotificationEvent toNotificationEvent(String jsonString) { * @param includeResource a flag that controls whether or not the resource object within * the event structure should be included in the serialized message. * @return the serialized message as a String - * @throws JAXBException * @throws FHIRException */ - public static String toJsonString(FHIRNotificationEvent event, boolean includeResource) throws JAXBException, FHIRException { + public static String toJsonString(FHIRNotificationEvent event, boolean includeResource) throws FHIRException { JsonObjectBuilder builder = Json.createObjectBuilder(); builder.add("lastUpdated", event.getLastUpdated()); builder.add("location", event.getLocation()); diff --git a/fhir-operation/src/main/java/com/ibm/watson/health/fhir/operation/registry/FHIROperationRegistry.java b/fhir-operation/src/main/java/com/ibm/watson/health/fhir/operation/registry/FHIROperationRegistry.java index c6dd824fa4f..ea0f80589b4 100644 --- a/fhir-operation/src/main/java/com/ibm/watson/health/fhir/operation/registry/FHIROperationRegistry.java +++ b/fhir-operation/src/main/java/com/ibm/watson/health/fhir/operation/registry/FHIROperationRegistry.java @@ -17,8 +17,6 @@ import java.util.logging.Level; import java.util.logging.Logger; -import javax.xml.bind.JAXBException; - import com.ibm.watson.health.fhir.exception.FHIROperationException; import com.ibm.watson.health.fhir.model.resource.OperationOutcome.Issue; import com.ibm.watson.health.fhir.model.type.IssueSeverity; @@ -49,7 +47,7 @@ private FHIROperationRegistry() { continue; } operationMap.put(operation.getName(), operation); - } catch (ServiceConfigurationError | FHIRValidationException | JAXBException e) { + } catch (ServiceConfigurationError | FHIRValidationException e) { log.log(Level.SEVERE, "Unable to validate operation $" + operationName + ". This operation will be skipped.", e); } } @@ -60,7 +58,7 @@ private FHIROperationRegistry() { } } - private boolean isValid(FHIROperation operation) throws FHIRValidationException, JAXBException, FHIRValidationException { + private boolean isValid(FHIROperation operation) throws FHIRValidationException, FHIRValidationException { List issues = FHIRValidator.validator(operation.getDefinition()).validate(); if (!issues.isEmpty()) { for (Issue issue : issues) { diff --git a/fhir-parent/pom.xml b/fhir-parent/pom.xml index ab8bb281d34..68c2348c61d 100644 --- a/fhir-parent/pom.xml +++ b/fhir-parent/pom.xml @@ -259,6 +259,16 @@ jackson-annotations 2.9.9 + + jakarta.annotation + jakarta.annotation-api + 1.3.5 + + + jakarta.xml.bind + jakarta.xml.bind-api + 2.3.2 + diff --git a/fhir-persistence-jdbc/pom.xml b/fhir-persistence-jdbc/pom.xml index 7ee1fe2109e..b6c34d532a9 100644 --- a/fhir-persistence-jdbc/pom.xml +++ b/fhir-persistence-jdbc/pom.xml @@ -101,6 +101,10 @@ jsonassert test + + jakarta.xml.bind + jakarta.xml.bind-api + diff --git a/fhir-swagger-generator/pom.xml b/fhir-swagger-generator/pom.xml index 5f1384726cb..6386de839e1 100644 --- a/fhir-swagger-generator/pom.xml +++ b/fhir-swagger-generator/pom.xml @@ -26,6 +26,10 @@ fhir-search ${project.version} + + jakarta.xml.bind + jakarta.xml.bind-api + diff --git a/fhir-tools/pom.xml b/fhir-tools/pom.xml index 2512649df5d..6a1df34b79a 100644 --- a/fhir-tools/pom.xml +++ b/fhir-tools/pom.xml @@ -11,7 +11,7 @@ maven-plugin - 2.20.1 + 3.0.0-M3 ${surefire.plugin.version} 0.8.2 From a35a4e87444b052c05cee79da97e2fd3f585642e Mon Sep 17 00:00:00 2001 From: Robin Arnold Date: Thu, 12 Sep 2019 14:45:48 -0400 Subject: [PATCH 2/2] issue #46 - fixed pom.xml format and default password for fhiruser Signed-off-by: Robin Arnold --- build/pre-integration-test.sh | 2 +- fhir-client/pom.xml | 2 +- fhir-install/src/main/resources/scripts/fhirSmokeTest.sh | 6 +++--- fhir-persistence-jdbc/pom.xml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/pre-integration-test.sh b/build/pre-integration-test.sh index c4216a67f9f..9cc4389301a 100644 --- a/build/pre-integration-test.sh +++ b/build/pre-integration-test.sh @@ -72,7 +72,7 @@ tries=0 status=0 while [ $status -ne 200 -a $tries -lt ${MAX_TRIES} ]; do tries=$((tries + 1)) - cmd="curl -k -o ${WORKSPACE}/metadata.json -I -w "%{http_code}" -u fhiruser:fhiruser $metadata_url" + cmd="curl -k -o ${WORKSPACE}/metadata.json -I -w "%{http_code}" -u fhiruser:change-password $metadata_url" echo "Executing[$tries]: $cmd" status=$($cmd) echo "Status code: $status" diff --git a/fhir-client/pom.xml b/fhir-client/pom.xml index f3058bd8f87..438b93540a4 100644 --- a/fhir-client/pom.xml +++ b/fhir-client/pom.xml @@ -58,6 +58,6 @@ jakarta.xml.bind jakarta.xml.bind-api - + diff --git a/fhir-install/src/main/resources/scripts/fhirSmokeTest.sh b/fhir-install/src/main/resources/scripts/fhirSmokeTest.sh index b9aad030e16..63198271a43 100644 --- a/fhir-install/src/main/resources/scripts/fhirSmokeTest.sh +++ b/fhir-install/src/main/resources/scripts/fhirSmokeTest.sh @@ -22,14 +22,14 @@ echo -n "Checking if server $SERVER_HOST is accessible on port $SERVER_PORT ... echo "OK!" TMP_DIR=$(mktemp -d) -curl -k -u fhiruser:fhiruser https://$SERVER_HOST:$SERVER_PORT/fhir-server/api/v4/metadata > $TMP_DIR/meta.json 2> /dev/null +curl -k -u fhiruser:change-password https://$SERVER_HOST:$SERVER_PORT/fhir-server/api/v4/metadata > $TMP_DIR/meta.json 2> /dev/null echo -n "Checking FHIR server signature... " -[ $(cat $TMP_DIR/meta.json | grep '"description" : "IBM Watson Health FHIR Server version ' | wc -l) != "1" ] && echo "Error! Signature not found." && exit 4 +[ $(cat $TMP_DIR/meta.json | grep '"description":"IBM Watson Health FHIR Server version ' | wc -l) != "1" ] && echo "Error! Signature not found." && exit 4 echo "OK!" echo -n "Checking FHIR API version... " -[ $(cat $TMP_DIR/meta.json | grep '"fhirVersion" : "4.0.0 - R4"' | wc -l) != "1" ] && echo "Error! Wrong FHIR version or version absent." && exit 5 +[ $(cat $TMP_DIR/meta.json | grep '"fhirVersion":"4.0.0"' | wc -l) != "1" ] && echo "Error! Wrong FHIR version or version absent." && exit 5 echo "OK!" echo diff --git a/fhir-persistence-jdbc/pom.xml b/fhir-persistence-jdbc/pom.xml index b6c34d532a9..414748fe467 100644 --- a/fhir-persistence-jdbc/pom.xml +++ b/fhir-persistence-jdbc/pom.xml @@ -104,7 +104,7 @@ jakarta.xml.bind jakarta.xml.bind-api - +