Skip to content

Commit

Permalink
Updated to latest versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jkiddo committed Feb 17, 2024
1 parent d720d6b commit 282b421
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 39 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM maven:3.9.1-eclipse-temurin-17 as build-cache
FROM maven:3.9.6-eclipse-temurin-17 as build-cache
WORKDIR /tmp/app

COPY pom.xml .
Expand Down
46 changes: 12 additions & 34 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.12</version>
<version>3.2.2</version>
</parent>

<groupId>org.jkiddo</groupId>
<artifactId>ember</artifactId>
<version>0.6.0-SNAPSHOT</version>
<version>0.7.0-SNAPSHOT</version>
<repositories>
<repository>
<id>oss-snapshots</id>
Expand All @@ -24,17 +24,18 @@
</repositories>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<hapi_version>6.6.0</hapi_version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<hapi_version>7.0.0</hapi_version>
</properties>

<dependencies>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility-groovy</artifactId>
<artifactId>awaitility</artifactId>
<version>4.2.0</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
Expand All @@ -51,36 +52,13 @@
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-jpaserver-base</artifactId>
<version>${hapi_version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-jcl</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.truth/truth -->
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>1.1.3</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.truth.extensions/truth-java8-extension -->

<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
<dependency>
<groupId>com.google.truth.extensions</groupId>
<artifactId>truth-java8-extension</artifactId>
<version>1.1.3</version>
<scope>test</scope>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.16.1</version>
</dependency>


Expand Down
13 changes: 9 additions & 4 deletions src/main/java/dk/jkiddo/EmberApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private IBaseBundle loadResourcesFromDirectory(File directory) {
} catch (IOException e) {
throw new RuntimeException(e.getMessage(), e);
}
}).map(fhirContext.newJsonParser().setSuppressNarratives(true)::parseResource).collect(Collectors.toList());
}).map(fhirContext.newJsonParser().setSuppressNarratives(true)::parseResource).toList();

var bundleBuilder = new BundleBuilder(fhirContext);
resources.forEach(bundleBuilder::addTransactionCreateEntry);
Expand Down Expand Up @@ -160,7 +160,7 @@ private void installPackage() throws IOException {
var npmAsBytes = new PackageLoaderSvc().loadPackageUrlContents(location);
var npmPackage = NpmPackage.fromPackage(new ByteArrayInputStream(npmAsBytes));
packageManager.addPackageToCache(npmPackage.id(), npmPackage.version(), new ByteArrayInputStream(npmAsBytes), npmPackage.description());
LOG.warn("Overwriting parameterized packageId with packageId from location paramter. packageId was '" + packageId + "'. New packageId will be '" + npmPackage.id() + "#" + npmPackage.version() + "'");
LOG.warn("Overwriting parameterized packageId with packageId from location parameter. packageId was '" + packageId + "'. New packageId will be '" + npmPackage.id() + "#" + npmPackage.version() + "'");
packageId = npmPackage.id() + "#" + npmPackage.version();
}

Expand Down Expand Up @@ -200,8 +200,13 @@ private List<IBaseResource> loadExampleResources(NpmPackage npmPackage) {
return List.of();
}

var fileNames = exampleFolder.getTypes().values().stream().flatMap(Collection::stream).collect(Collectors.toList());
LOG.info("Found " + fileNames.size() + " example resources in " + npmPackage.name());
List<String> fileNames;
try {
fileNames = exampleFolder.getTypes().values().stream().flatMap(Collection::stream).toList();
} catch (IOException e) {
throw new RuntimeException(e.getMessage(), e);
}
LOG.info("Found " + fileNames.size() + " example resources in " + npmPackage.name());

return fileNames.stream().map(fileName -> {
try {
Expand Down

0 comments on commit 282b421

Please sign in to comment.