[java-idp-integration-tests] branch main updated: Support Jetty 12 using XML context file to deploy testbed webapp
Tom Zeller
tzeller at dragonacea.biz
Wed May 8 21:45:02 UTC 2024
This is an automated email from the git hooks/post-receive script.
tzeller pushed a commit to branch main
in repository java-idp-integration-tests.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=37f6a4cca5aa7c42fad53c7decda6558a93ad1f2
The following commit(s) were added to refs/heads/main by this push:
new 37f6a4c Support Jetty 12 using XML context file to deploy testbed webapp
37f6a4c is described below
commit 37f6a4cca5aa7c42fad53c7decda6558a93ad1f2
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Wed May 8 16:44:53 2024 -0500
Support Jetty 12 using XML context file to deploy testbed webapp
---
.../idp/integration/tests/BaseIntegrationTest.java | 7 ++++++
src/test/jetty-base/etc/testbed.xml | 28 ----------------------
src/test/jetty-base/webapps/testbed.xml | 18 ++++++++++++++
3 files changed, 25 insertions(+), 28 deletions(-)
diff --git a/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java b/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
index f0241d7..373320c 100644
--- a/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
@@ -663,6 +663,13 @@ public abstract class BaseIntegrationTest {
// set tmp directory system property
serverCommands.add("-Djava.io.tmpdir=" + pathToJettyBase.resolve("tmp").toAbsolutePath());
+
+ // Adjust package name for Jetty 12
+ if (jettyVersion.startsWith("12")) {
+ final Path pathToTestbedXML = pathToJettyBase.resolve(Paths.get("webapps", "testbed.xml"));
+ replaceFile(pathToTestbedXML, "org.eclipse.jetty.webapp.WebAppContext",
+ "org.eclipse.jetty.ee9.webapp.WebAppContext");
+ }
} else {
Assert.fail("Unable to find jetty.home");
}
diff --git a/src/test/jetty-base/etc/testbed.xml b/src/test/jetty-base/etc/testbed.xml
deleted file mode 100644
index 4a2b6d6..0000000
--- a/src/test/jetty-base/etc/testbed.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
-
-<!-- =============================================================== -->
-<!-- Configure the Shibboleth Testbed webapp -->
-<!-- =============================================================== -->
-<Configure id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
- <Call name="addHandler">
- <Arg>
- <New class="org.eclipse.jetty.webapp.WebAppContext">
- <Set name="war">../shibboleth-idp/testbed-war/idp-testbed.war</Set>
- <Set name="contextPath">/</Set>
- <Set name="extractWAR">false</Set>
- <Set name="copyWebDir">false</Set>
- <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=375504 -->
- <Set name="copyWebInf">true</Set>
- <Call name="setAttribute">
- <Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
- <Arg>none</Arg>
- </Call>
- <Call name="setAttribute">
- <Arg>org.eclipse.jetty.webapp.basetempdir</Arg>
- <Arg><Property name="jetty.base" />/tmp</Arg>
- </Call>
- </New>
- </Arg>
- </Call>
-</Configure>
\ No newline at end of file
diff --git a/src/test/jetty-base/webapps/testbed.xml b/src/test/jetty-base/webapps/testbed.xml
new file mode 100644
index 0000000..63fb6e0
--- /dev/null
+++ b/src/test/jetty-base/webapps/testbed.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
+<!-- =============================================================== -->
+<!-- Configure the Shibboleth IdP Testbed webapp -->
+<!-- =============================================================== -->
+<Configure class="org.eclipse.jetty.webapp.WebAppContext">
+ <Set name="war"><SystemProperty name="idp.home" default="/opt/shibboleth-idp" />/testbed-war/idp-testbed.war</Set>
+ <Set name="contextPath">/</Set>
+ <Set name="extractWAR">false</Set>
+ <Set name="copyWebDir">false</Set>
+ <Set name="copyWebInf">true</Set>
+ <Set name="persistTempDirectory">false</Set>
+ <Call name="setAttribute">
+ <Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
+ <Arg>none</Arg>
+ </Call>
+</Configure>
+
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list