Skip to content

Commit

Permalink
Merge pull request #47 from IBM/issue-46
Browse files Browse the repository at this point in the history
Update build for OpenJDK 11 #46
  • Loading branch information
lmsurpre committed Sep 12, 2019
2 parents 1e0552e + d3c2011 commit 6a4401f
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 18 deletions.
2 changes: 1 addition & 1 deletion build/pre-integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions fhir-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,9 @@
<artifactId>jsonassert</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
</dependencies>
</project>
15 changes: 9 additions & 6 deletions fhir-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,29 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>fhir-examples</artifactId>
<groupId>com.ibm.watson.health</groupId>
<version>4.0.0-SNAPSHOT</version>

<parent>
<groupId>com.ibm.watson.health</groupId>
<artifactId>fhir-parent</artifactId>
<version>4.0.0-SNAPSHOT</version>
<relativePath>../fhir-parent</relativePath>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>4.0.0-SNAPSHOT</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0.2</version>
<configuration>
<skip>true</skip>
</configuration>
Expand Down
6 changes: 3 additions & 3 deletions fhir-install/src/main/resources/scripts/fhirSmokeTest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions fhir-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}
Expand All @@ -60,7 +58,7 @@ private FHIROperationRegistry() {
}
}

private boolean isValid(FHIROperation operation) throws FHIRValidationException, JAXBException, FHIRValidationException {
private boolean isValid(FHIROperation operation) throws FHIRValidationException, FHIRValidationException {
List<Issue> issues = FHIRValidator.validator(operation.getDefinition()).validate();
if (!issues.isEmpty()) {
for (Issue issue : issues) {
Expand Down
10 changes: 10 additions & 0 deletions fhir-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,16 @@
<artifactId>jackson-annotations</artifactId>
<version>2.9.9</version>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>1.3.5</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.2</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
4 changes: 4 additions & 0 deletions fhir-persistence-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@
<artifactId>jsonassert</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
</dependencies>

</project>
4 changes: 4 additions & 0 deletions fhir-swagger-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
<artifactId>fhir-search</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
2 changes: 1 addition & 1 deletion fhir-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<packaging>maven-plugin</packaging>

<properties>
<surefire.plugin.version>2.20.1</surefire.plugin.version>
<surefire.plugin.version>3.0.0-M3</surefire.plugin.version>
<!-- needed for generating jacoco aggregate report in fhir-coverage-reports -->
<maven.surefire.report.plugin>${surefire.plugin.version}</maven.surefire.report.plugin>
<jacoco.plugin.version>0.8.2</jacoco.plugin.version>
Expand Down

0 comments on commit 6a4401f

Please sign in to comment.