diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index ca71a3ce28a1..46013d167c42 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -67,8 +67,12 @@ jobs:
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
+ - name: Set up Maven
+ run:
+ mvn -e -B -V --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.1.0:wrapper "-Dmaven=3.8.6"
+
- name: Clean install dependencies and build
- run: mvn clean install -DskipTests
+ run: ./mvnw clean install -DskipTests -V -B
# âšī¸ Command-line programs to run using the OS shell.
# đ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
diff --git a/jetty-ee10/jetty-ee10-proxy/pom.xml b/jetty-ee10/jetty-ee10-proxy/pom.xml
index 808869d39a26..6f2ab96b61e3 100644
--- a/jetty-ee10/jetty-ee10-proxy/pom.xml
+++ b/jetty-ee10/jetty-ee10-proxy/pom.xml
@@ -12,7 +12,7 @@
${project.groupId}.proxy
- org.eclipse.jetty.proxy.*
+ org.eclipse.jetty.ee10.proxy.*
diff --git a/jetty-ee8/jetty-ee8-proxy/pom.xml b/jetty-ee8/jetty-ee8-proxy/pom.xml
new file mode 100644
index 000000000000..8ddb2323f6f4
--- /dev/null
+++ b/jetty-ee8/jetty-ee8-proxy/pom.xml
@@ -0,0 +1,79 @@
+
+
+ org.eclipse.jetty.ee8
+ jetty-ee8
+ 12.0.0-SNAPSHOT
+
+
+ 4.0.0
+ jetty-ee8-proxy
+ EE8 :: Jetty :: Proxy
+ Jetty Proxy
+
+
+ jetty-ee9-proxy
+ ${project.groupId}.proxy
+ org.eclipse.jetty.ee8.proxy.*
+
+
+
+
+ maven-surefire-plugin
+
+
+ @{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.ee8.proxy=org.eclipse.jetty.logging
+
+
+
+
+
+
+
+ org.slf4j
+ slf4j-api
+
+
+ org.eclipse.jetty.toolchain
+ jetty-servlet-api
+ provided
+
+
+ org.eclipse.jetty.ee8
+ jetty-ee8-servlet
+ provided
+
+
+ org.eclipse.jetty
+ jetty-util
+
+
+ org.eclipse.jetty
+ jetty-client
+
+
+ org.eclipse.jetty
+ jetty-util-ajax
+ test
+
+
+ org.eclipse.jetty
+ jetty-http-tools
+ test
+
+
+ org.eclipse.jetty
+ jetty-slf4j-impl
+ test
+
+
+ org.eclipse.jetty
+ jetty-rewrite
+ test
+
+
+ org.eclipse.jetty.toolchain
+ jetty-test-helper
+ test
+
+
+
diff --git a/jetty-ee8/jetty-ee8-proxy/src/main/config/etc/jetty-ee8-proxy.xml b/jetty-ee8/jetty-ee8-proxy/src/main/config/etc/jetty-ee8-proxy.xml
new file mode 100644
index 000000000000..5ed1d5837eb0
--- /dev/null
+++ b/jetty-ee8/jetty-ee8-proxy/src/main/config/etc/jetty-ee8-proxy.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ maxThreads
+
+
+
+ maxConnections
+
+
+
+ idleTimeout
+
+
+
+ timeout
+
+
+
+
+
+
+
+
+
diff --git a/jetty-ee8/jetty-ee8-proxy/src/main/config/modules/ee8-proxy.mod b/jetty-ee8/jetty-ee8-proxy/src/main/config/modules/ee8-proxy.mod
new file mode 100644
index 000000000000..d2d675af92b4
--- /dev/null
+++ b/jetty-ee8/jetty-ee8-proxy/src/main/config/modules/ee8-proxy.mod
@@ -0,0 +1,27 @@
+# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
+
+[description]
+Enables the Jetty Proxy service.
+Allows the server to act as a non-transparent proxy for browsers.
+
+[depend]
+ee8-servlet
+client
+
+[environment]
+ee8
+
+[lib]
+lib/jetty-ee8-proxy-${jetty.version}.jar
+
+[xml]
+etc/jetty-ee8-proxy.xml
+
+[ini-template]
+## Proxy Configuration
+# jetty.proxy.servletClass=org.eclipse.jetty.ee8.proxy.ProxyServlet
+# jetty.proxy.servletMapping=/*
+# jetty.proxy.maxThreads=128
+# jetty.proxy.maxConnections=256
+# jetty.proxy.idleTimeout=30000
+# jetty.proxy.timeout=60000
diff --git a/jetty-ee8/pom.xml b/jetty-ee8/pom.xml
index ca8d955742b9..a04983010b40 100644
--- a/jetty-ee8/pom.xml
+++ b/jetty-ee8/pom.xml
@@ -34,6 +34,7 @@
jetty-ee8-jaas
jetty-ee8-plus
jetty-ee8-jndi
+ jetty-ee8-proxy
jetty-ee8-annotations
jetty-ee8-websocket
jetty-ee8-quickstart
diff --git a/jetty-ee9/jetty-ee9-proxy/src/main/config/modules/ee9-proxy.mod b/jetty-ee9/jetty-ee9-proxy/src/main/config/modules/ee9-proxy.mod
index 82a6ac58589e..8243766f95b3 100644
--- a/jetty-ee9/jetty-ee9-proxy/src/main/config/modules/ee9-proxy.mod
+++ b/jetty-ee9/jetty-ee9-proxy/src/main/config/modules/ee9-proxy.mod
@@ -19,7 +19,7 @@ etc/jetty-ee9-proxy.xml
[ini-template]
## Proxy Configuration
-# jetty.proxy.servletClass=org.eclipse.jetty.proxy.ProxyServlet
+# jetty.proxy.servletClass=org.eclipse.jetty.ee9.proxy.ProxyServlet
# jetty.proxy.servletMapping=/*
# jetty.proxy.maxThreads=128
# jetty.proxy.maxConnections=256
diff --git a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ClientAuthProxyTest.java b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ClientAuthProxyTest.java
index 256e8e01bab6..c6fbb941fe65 100644
--- a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ClientAuthProxyTest.java
+++ b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ClientAuthProxyTest.java
@@ -117,7 +117,7 @@ private void startServer(Handler handler) throws Exception
serverTLS.setSniRequired(false);
serverTLS.setNeedClientAuth(true);
// The KeyStore is also a TrustStore.
- serverTLS.setKeyStorePath(MavenTestingUtils.getTestResourceFile("client_auth/server_keystore.p12").getAbsolutePath());
+ serverTLS.setKeyStorePath(MavenTestingUtils.getTargetFile("test-classes/client_auth/server_keystore.p12").getAbsolutePath());
serverTLS.setKeyStorePassword("storepwd");
serverTLS.setKeyStoreType("PKCS12");
@@ -166,7 +166,7 @@ private void startProxy(AbstractProxyServlet servlet) throws Exception
proxyTLS.setSniRequired(false);
proxyTLS.setNeedClientAuth(true);
// The KeyStore is also a TrustStore.
- proxyTLS.setKeyStorePath(MavenTestingUtils.getTestResourceFile("client_auth/proxy_keystore.p12").getAbsolutePath());
+ proxyTLS.setKeyStorePath(MavenTestingUtils.getTargetFile("test-classes/client_auth/proxy_keystore.p12").getAbsolutePath());
proxyTLS.setKeyStorePassword("storepwd");
proxyTLS.setKeyStoreType("PKCS12");
@@ -188,7 +188,7 @@ private void startClient() throws Exception
SslContextFactory.Client clientTLS = new SslContextFactory.Client();
// Disable TLS-level hostname verification.
clientTLS.setEndpointIdentificationAlgorithm(null);
- clientTLS.setKeyStorePath(MavenTestingUtils.getTestResourceFile("client_auth/client_keystore.p12").getAbsolutePath());
+ clientTLS.setKeyStorePath(MavenTestingUtils.getTargetFile("test-classes/client_auth/client_keystore.p12").getAbsolutePath());
clientTLS.setKeyStorePassword("storepwd");
clientTLS.setKeyStoreType("PKCS12");
ClientConnector connector = new ClientConnector();
@@ -261,7 +261,7 @@ private HttpClient getOrCreateHttpClient(String user)
SslContextFactory.Client clientTLS = new SslContextFactory.Client();
// Disable TLS-level hostname verification for this test.
clientTLS.setEndpointIdentificationAlgorithm(null);
- clientTLS.setKeyStorePath(MavenTestingUtils.getTestResourceFile("client_auth/proxy_keystore.p12").getAbsolutePath());
+ clientTLS.setKeyStorePath(MavenTestingUtils.getTargetFile("test-classes/client_auth/proxy_keystore.p12").getAbsolutePath());
clientTLS.setKeyStorePassword("storepwd");
clientTLS.setKeyStoreType("PKCS12");
clientTLS.setCertAlias(key + "_proxy");
@@ -327,7 +327,7 @@ protected KeyManager[] getKeyManagers(KeyStore keyStore) throws Exception
};
// Disable TLS-level hostname verification for this test.
clientTLS.setEndpointIdentificationAlgorithm(null);
- clientTLS.setKeyStorePath(MavenTestingUtils.getTestResourceFile("client_auth/proxy_keystore.p12").getAbsolutePath());
+ clientTLS.setKeyStorePath(MavenTestingUtils.getTargetFile("test-classes/client_auth/proxy_keystore.p12").getAbsolutePath());
clientTLS.setKeyStorePassword("storepwd");
clientTLS.setKeyStoreType("PKCS12");
ClientConnector connector = new ClientConnector();
@@ -390,7 +390,7 @@ protected KeyManager[] getKeyManagers(KeyStore keyStore) throws Exception
};
// Disable hostname verification is required.
clientTLS.setEndpointIdentificationAlgorithm(null);
- clientTLS.setKeyStorePath(MavenTestingUtils.getTestResourceFile("client_auth/proxy_keystore.p12").getAbsolutePath());
+ clientTLS.setKeyStorePath(MavenTestingUtils.getTargetFile("test-classes/client_auth/proxy_keystore.p12").getAbsolutePath());
clientTLS.setKeyStorePassword("storepwd");
clientTLS.setKeyStoreType("PKCS12");
ClientConnector connector = new ClientConnector();
@@ -440,7 +440,7 @@ private T configure(T tls, String user)
{
// Disable TLS-level hostname verification for this test.
tls.setEndpointIdentificationAlgorithm(null);
- tls.setKeyStorePath(MavenTestingUtils.getTestResourceFile("client_auth/proxy_keystore.p12").getAbsolutePath());
+ tls.setKeyStorePath(MavenTestingUtils.getTargetFile("test-classes/client_auth/proxy_keystore.p12").getAbsolutePath());
tls.setKeyStorePassword("storepwd");
tls.setKeyStoreType("PKCS12");
if (user != null)
diff --git a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ConnectHandlerSSLTest.java b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ConnectHandlerSSLTest.java
index 5b93a6a8a895..623638df23ef 100644
--- a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ConnectHandlerSSLTest.java
+++ b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ConnectHandlerSSLTest.java
@@ -48,7 +48,7 @@ public class ConnectHandlerSSLTest extends AbstractConnectHandlerTest
public void prepare() throws Exception
{
sslContextFactory = new SslContextFactory.Server();
- String keyStorePath = MavenTestingUtils.getTestResourceFile("server_keystore.p12").getAbsolutePath();
+ String keyStorePath = MavenTestingUtils.getTargetFile("test-classes/server_keystore.p12").getAbsolutePath();
sslContextFactory.setKeyStorePath(keyStorePath);
sslContextFactory.setKeyStorePassword("storepwd");
server = new Server();
diff --git a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyServerTest.java b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyServerTest.java
index 562fa6adc7ad..3fdee0004886 100644
--- a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyServerTest.java
+++ b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyServerTest.java
@@ -72,7 +72,7 @@ public static Stream serverTLS()
private static SslContextFactory.Server newServerSslContextFactory()
{
SslContextFactory.Server serverTLS = new SslContextFactory.Server();
- String keyStorePath = MavenTestingUtils.getTestResourceFile("server_keystore.p12").getAbsolutePath();
+ String keyStorePath = MavenTestingUtils.getTargetFile("test-classes/server_keystore.p12").getAbsolutePath();
serverTLS.setKeyStorePath(keyStorePath);
serverTLS.setKeyStorePassword("storepwd");
return serverTLS;
diff --git a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyTLSServerTest.java b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyTLSServerTest.java
index 7f6dd16f66f9..b806d09a9d92 100644
--- a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyTLSServerTest.java
+++ b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ForwardProxyTLSServerTest.java
@@ -144,7 +144,7 @@ private HttpClient newHttpClient()
private static SslContextFactory.Server newServerSslContextFactory()
{
SslContextFactory.Server sslContextFactory = new SslContextFactory.Server();
- String keyStorePath = MavenTestingUtils.getTestResourceFile("server_keystore.p12").getAbsolutePath();
+ String keyStorePath = MavenTestingUtils.getTargetFile("test-classes/server_keystore.p12").getAbsolutePath();
sslContextFactory.setKeyStorePath(keyStorePath);
sslContextFactory.setKeyStorePassword("storepwd");
return sslContextFactory;
@@ -153,7 +153,7 @@ private static SslContextFactory.Server newServerSslContextFactory()
private static SslContextFactory.Server newProxySslContextFactory()
{
SslContextFactory.Server proxyTLS = new SslContextFactory.Server();
- String keyStorePath = MavenTestingUtils.getTestResourceFile("proxy_keystore.p12").getAbsolutePath();
+ String keyStorePath = MavenTestingUtils.getTargetFile("test-classes/proxy_keystore.p12").getAbsolutePath();
proxyTLS.setKeyStorePath(keyStorePath);
proxyTLS.setKeyStorePassword("storepwd");
return proxyTLS;
@@ -692,7 +692,7 @@ else if (port == proxyPort)
return keyManagers;
}
};
- clientSslContextFactory.setKeyStorePath(MavenTestingUtils.getTestResourceFile("client_keystore.p12").getAbsolutePath());
+ clientSslContextFactory.setKeyStorePath(MavenTestingUtils.getTargetFile("test-classes/client_keystore.p12").getAbsolutePath());
clientSslContextFactory.setKeyStorePassword("storepwd");
clientSslContextFactory.setEndpointIdentificationAlgorithm(null);
ClientConnector clientConnector = new ClientConnector();
@@ -747,7 +747,7 @@ public SSLEngine newSSLEngine(String host, int port)
return super.newSSLEngine(host, port);
}
};
- clientTLS.setKeyStorePath(MavenTestingUtils.getTestResourceFile("client_server_keystore.p12").getAbsolutePath());
+ clientTLS.setKeyStorePath(MavenTestingUtils.getTargetFile("test-classes/client_server_keystore.p12").getAbsolutePath());
clientTLS.setKeyStorePassword("storepwd");
clientTLS.setEndpointIdentificationAlgorithm(null);
ClientConnector clientConnector = new ClientConnector();
@@ -765,7 +765,7 @@ public SSLEngine newSSLEngine(String host, int port)
return super.newSSLEngine(host, port);
}
};
- proxyClientTLS.setKeyStorePath(MavenTestingUtils.getTestResourceFile("client_proxy_keystore.p12").getAbsolutePath());
+ proxyClientTLS.setKeyStorePath(MavenTestingUtils.getTargetFile("test-classes/client_proxy_keystore.p12").getAbsolutePath());
proxyClientTLS.setKeyStorePassword("storepwd");
proxyClientTLS.setEndpointIdentificationAlgorithm(null);
proxyClientTLS.start();
diff --git a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ProxyServletTest.java b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ProxyServletTest.java
index 21f7f859fa34..ac7316942356 100644
--- a/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ProxyServletTest.java
+++ b/jetty-ee9/jetty-ee9-proxy/src/test/java/org/eclipse/jetty/ee9/proxy/ProxyServletTest.java
@@ -140,7 +140,7 @@ private void startServer(HttpServlet servlet) throws Exception
server.addConnector(serverConnector);
SslContextFactory.Server sslContextFactory = new SslContextFactory.Server();
- String keyStorePath = MavenTestingUtils.getTestResourceFile("server_keystore.p12").getAbsolutePath();
+ String keyStorePath = MavenTestingUtils.getTargetFile("test-classes/server_keystore.p12").getAbsolutePath();
sslContextFactory.setKeyStorePath(keyStorePath);
sslContextFactory.setKeyStorePassword("storepwd");
tlsServerConnector = new ServerConnector(server, new SslConnectionFactory(