From 282b42188282f469e70beaa66a84a8c7f4bb63a1 Mon Sep 17 00:00:00 2001 From: jkv Date: Sat, 17 Feb 2024 14:05:26 +0100 Subject: [PATCH] Updated to latest versions --- Dockerfile | 2 +- pom.xml | 46 +++++-------------- src/main/java/dk/jkiddo/EmberApplication.java | 13 ++++-- 3 files changed, 22 insertions(+), 39 deletions(-) diff --git a/Dockerfile b/Dockerfile index 70a3556..eb1998e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 . diff --git a/pom.xml b/pom.xml index 1945421..16ea73f 100644 --- a/pom.xml +++ b/pom.xml @@ -7,12 +7,12 @@ org.springframework.boot spring-boot-starter-parent - 2.7.12 + 3.2.2 org.jkiddo ember - 0.6.0-SNAPSHOT + 0.7.0-SNAPSHOT oss-snapshots @@ -24,17 +24,18 @@ - 11 - 11 - 6.6.0 + 17 + 17 + 7.0.0 org.awaitility - awaitility-groovy + awaitility 4.2.0 + org.springframework.boot spring-boot-starter @@ -51,36 +52,13 @@ ca.uhn.hapi.fhir hapi-fhir-jpaserver-base ${hapi_version} - - - org.springframework - spring-jcl - - - commons-logging - commons-logging - - - - - org.junit.jupiter - junit-jupiter-engine - 5.8.2 - test - - - com.google.truth - truth - 1.1.3 - test - - + + - com.google.truth.extensions - truth-java8-extension - 1.1.3 - test + com.fasterxml.jackson.core + jackson-core + 2.16.1 diff --git a/src/main/java/dk/jkiddo/EmberApplication.java b/src/main/java/dk/jkiddo/EmberApplication.java index 53b5394..bb39f3a 100644 --- a/src/main/java/dk/jkiddo/EmberApplication.java +++ b/src/main/java/dk/jkiddo/EmberApplication.java @@ -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); @@ -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(); } @@ -200,8 +200,13 @@ private List 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 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 {