From 724339c8861d61c3e6c62cb27024653d01b58335 Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 2 Jul 2024 11:22:18 -0400 Subject: [PATCH] Bump jetty_version from 12.0.3 to 12.0.9 (#6022) * jetty_version from 12.0.3 to 12.0.9 * Changelog * Try to resolve test issue --------- Co-authored-by: James Agnew --- ...-spring-boot-not-compatible-with-jetty-version.yaml | 5 +++++ .../src/test/java/ca/uhn/fhir/jpa/test/WebTest.java | 10 +++++++++- pom.xml | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_4_0/6021-spring-boot-not-compatible-with-jetty-version.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_4_0/6021-spring-boot-not-compatible-with-jetty-version.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_4_0/6021-spring-boot-not-compatible-with-jetty-version.yaml new file mode 100644 index 00000000000..f7c5c0caff3 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_4_0/6021-spring-boot-not-compatible-with-jetty-version.yaml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 6021 +title: "The updated Spring Boot was not compatible with jetty version 12.0.3. + Jetty has been updated to 12.0.9, fixing this issue." diff --git a/hapi-fhir-testpage-overlay/src/test/java/ca/uhn/fhir/jpa/test/WebTest.java b/hapi-fhir-testpage-overlay/src/test/java/ca/uhn/fhir/jpa/test/WebTest.java index 55841741219..22129dd88b0 100644 --- a/hapi-fhir-testpage-overlay/src/test/java/ca/uhn/fhir/jpa/test/WebTest.java +++ b/hapi-fhir-testpage-overlay/src/test/java/ca/uhn/fhir/jpa/test/WebTest.java @@ -18,6 +18,9 @@ import org.eclipse.jetty.ee10.servlet.ServletContextHandler; import org.eclipse.jetty.ee10.servlet.ServletHandler; import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.util.resource.PathResource; +import org.eclipse.jetty.util.resource.PathResourceFactory; +import org.eclipse.jetty.util.resource.Resource; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Composition; @@ -59,6 +62,7 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; +import java.net.URI; import java.net.URL; import java.util.List; import java.util.Optional; @@ -110,7 +114,11 @@ public class WebTest { ServletContextHandler contextHandler = new MyServletContextHandler(); contextHandler.setAllowNullPathInContext(true); contextHandler.setServletHandler(servletHandler); - contextHandler.setBaseResourceAsString("hapi-fhir-testpage-overlay/src/main/webapp"); + Resource base = new PathResourceFactory().newResource("hapi-fhir-testpage-overlay/src/main/webapp"); + if (!base.exists()) { + base = new PathResourceFactory().newResource("src/main/webapp"); + } + contextHandler.setBaseResource(base); ourOverlayServer = new Server(0); ourOverlayServer.setHandler(contextHandler); diff --git a/pom.xml b/pom.xml index 2aeeea06067..8ea0a85da38 100644 --- a/pom.xml +++ b/pom.xml @@ -982,7 +982,7 @@ 4.0.4 4.9.0 3.0.3 - 12.0.3 + 12.0.9 3.0.2 5.10.1 0.64.8