From 81f80fa3654cc49f41a4d09ec91ddb0d683767c2 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 9 Aug 2022 14:56:26 -0500 Subject: [PATCH] Putting content.jar in a place that EE8 tooling can find. --- .../jetty/ee9/servlet/StaticFromJarServerTest.java | 5 +++-- .../src/test/{ => resources}/jars/content.jar | Bin 2 files changed, 3 insertions(+), 2 deletions(-) rename jetty-ee9/jetty-ee9-servlet/src/test/{ => resources}/jars/content.jar (100%) diff --git a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/StaticFromJarServerTest.java b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/StaticFromJarServerTest.java index a03d097e6fb..87d0f0b9515 100644 --- a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/StaticFromJarServerTest.java +++ b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/StaticFromJarServerTest.java @@ -17,7 +17,6 @@ import java.io.FileNotFoundException; import java.net.URI; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.client.api.ContentResponse; @@ -28,6 +27,7 @@ import org.eclipse.jetty.io.ClientConnector; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.DefaultHandler; +import org.eclipse.jetty.toolchain.test.MavenTestingUtils; import org.eclipse.jetty.util.URIUtil; import org.eclipse.jetty.util.component.LifeCycle; import org.eclipse.jetty.util.resource.Resource; @@ -76,7 +76,8 @@ public class StaticFromJarServerTest @BeforeEach public void startServer() throws Exception { - Path jarFile = Paths.get("src/test/jars/content.jar"); + Path testResources = MavenTestingUtils.getTargetPath("test-classes"); + Path jarFile = testResources.resolve("jars/content.jar"); if (!Files.exists(jarFile)) throw new FileNotFoundException(jarFile.toString()); diff --git a/jetty-ee9/jetty-ee9-servlet/src/test/jars/content.jar b/jetty-ee9/jetty-ee9-servlet/src/test/resources/jars/content.jar similarity index 100% rename from jetty-ee9/jetty-ee9-servlet/src/test/jars/content.jar rename to jetty-ee9/jetty-ee9-servlet/src/test/resources/jars/content.jar