You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2026/09/03 21:24:50 UTC
(maven-wagon) branch wagon-3.x updated: Upgrade Jetty to 9.4.58.v20250814 and de-aggregate jetty-all (#943)
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch wagon-3.x
in repository https://gitbox.apache.org/repos/asf/maven-wagon.git
The following commit(s) were added to refs/heads/wagon-3.x by this push:
new 3722727f Upgrade Jetty to 9.4.58.v20250814 and de-aggregate jetty-all (#943)
3722727f is described below
commit 3722727f4de288d1f48dc73b4e223616daede59c
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Thu Sep 3 22:49:25 2026 +0200
Upgrade Jetty to 9.4.58.v20250814 and de-aggregate jetty-all (#943)
---
pom.xml | 8 +++++---
wagon-provider-test/pom.xml | 20 ++++++++++++++++++--
.../apache/maven/wagon/http/HttpWagonTestCase.java | 11 ++++++++++-
wagon-providers/wagon-http-lightweight/pom.xml | 9 +++++++--
wagon-providers/wagon-http/pom.xml | 14 ++++++++++++--
.../providers/http/ErrorWithMessageServlet.java | 18 +++++++++++++-----
.../providers/http/HttpWagonHttpServerTestCase.java | 2 --
wagon-providers/wagon-ssh/pom.xml | 4 ++--
wagon-providers/wagon-webdav-jackrabbit/pom.xml | 14 ++++++++++++--
wagon-tcks/wagon-tck-http/pom.xml | 20 ++++++++++++++++++--
.../maven/wagon/tck/http/fixture/ServerFixture.java | 11 ++++++++---
11 files changed, 105 insertions(+), 26 deletions(-)
diff --git a/pom.xml b/pom.xml
index fa097a4d..b7ccccdb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -242,9 +242,11 @@ under the License.
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.aggregate</groupId>
- <artifactId>jetty-all</artifactId>
- <version>9.2.30.v20200428</version>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-bom</artifactId>
+ <version>9.4.58.v20250814</version>
+ <type>pom</type>
+ <scope>import</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
diff --git a/wagon-provider-test/pom.xml b/wagon-provider-test/pom.xml
index ed944e73..38ff2c40 100644
--- a/wagon-provider-test/pom.xml
+++ b/wagon-provider-test/pom.xml
@@ -70,8 +70,24 @@ under the License.
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.aggregate</groupId>
- <artifactId>jetty-all</artifactId>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-security</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-http</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
diff --git a/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java b/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java
index b4185976..dda30749 100644
--- a/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java
+++ b/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java
@@ -65,6 +65,7 @@
import org.eclipse.jetty.security.ConstraintSecurityHandler;
import org.eclipse.jetty.security.HashLoginService;
import org.eclipse.jetty.security.SecurityHandler;
+import org.eclipse.jetty.security.UserStore;
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.HttpConfiguration;
@@ -427,6 +428,7 @@ public void testGzipGet() throws Exception {
root.setResourceBase(localRepositoryPath);
ServletHolder servletHolder = new ServletHolder(new DefaultServlet());
servletHolder.setInitParameter("gzip", "true");
+ servletHolder.setInitParameter("precompressed", "true");
root.addServlet(servletHolder, "/*");
addConnector(server);
server.setHandler(root);
@@ -1475,6 +1477,11 @@ private String writeTestFile(File parent, String child, String compressionType)
OutputStream out = new FileOutputStream(file);
try {
out.write(child.getBytes());
+ // Pad uncompressed file so compressed.length() < uncompressed.length()
+ // (Jetty 9.4 ResourceService only serves precompressed files if compressed size is smaller)
+ for (int i = 0; i < 100; i++) {
+ out.write(child.getBytes());
+ }
} finally {
out.close();
}
@@ -1982,7 +1989,9 @@ protected TestSecurityHandler createSecurityHandler() {
TestSecurityHandler sh = new TestSecurityHandler();
HashLoginService hashLoginService = new HashLoginService("MyRealm");
- hashLoginService.putUser("user", new Password("secret"), new String[] {"admin"});
+ UserStore userStore = new UserStore();
+ userStore.addUser("user", new Password("secret"), new String[] {"admin"});
+ hashLoginService.setUserStore(userStore);
sh.setLoginService(hashLoginService);
sh.setConstraintMappings(new ConstraintMapping[] {cm});
sh.setAuthenticator(new BasicAuthenticator());
diff --git a/wagon-providers/wagon-http-lightweight/pom.xml b/wagon-providers/wagon-http-lightweight/pom.xml
index db6ababc..729293e0 100644
--- a/wagon-providers/wagon-http-lightweight/pom.xml
+++ b/wagon-providers/wagon-http-lightweight/pom.xml
@@ -63,8 +63,13 @@ under the License.
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.aggregate</groupId>
- <artifactId>jetty-all</artifactId>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/wagon-providers/wagon-http/pom.xml b/wagon-providers/wagon-http/pom.xml
index a63327d6..9722dd24 100644
--- a/wagon-providers/wagon-http/pom.xml
+++ b/wagon-providers/wagon-http/pom.xml
@@ -85,8 +85,18 @@ under the License.
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.aggregate</groupId>
- <artifactId>jetty-all</artifactId>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/ErrorWithMessageServlet.java b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/ErrorWithMessageServlet.java
index 4eadd309..3845d706 100644
--- a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/ErrorWithMessageServlet.java
+++ b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/ErrorWithMessageServlet.java
@@ -55,16 +55,24 @@ public class ErrorWithMessageServlet extends HttpServlet {
public static final String MESSAGE = "it sucks!";
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ int status = 0;
if (request.getPathInfo().endsWith("/401")) {
- response.sendError(401, MESSAGE);
+ status = 401;
} else if (request.getPathInfo().endsWith("/403")) {
- response.sendError(403, MESSAGE);
+ status = 403;
} else if (request.getPathInfo().endsWith("/404")) {
- response.sendError(404, MESSAGE);
+ status = 404;
} else if (request.getPathInfo().endsWith("/407")) {
- response.sendError(407, MESSAGE);
+ status = 407;
} else if (request.getPathInfo().endsWith("/500")) {
- response.sendError(500, MESSAGE);
+ status = 500;
+ }
+ if (status > 0) {
+ if (response instanceof org.eclipse.jetty.server.Response) {
+ ((org.eclipse.jetty.server.Response) response).setStatusWithReason(status, MESSAGE);
+ } else {
+ response.sendError(status, MESSAGE);
+ }
}
}
}
diff --git a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonHttpServerTestCase.java b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonHttpServerTestCase.java
index 45b59d54..18ed9e94 100644
--- a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonHttpServerTestCase.java
+++ b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonHttpServerTestCase.java
@@ -46,8 +46,6 @@ protected void startTestServer(TestInfo testInfo) throws Exception {
server = new Server(0);
context = new ServletContextHandler(ServletContextHandler.SESSIONS);
- resourceHandler = new ResourceHandler();
- context.setHandler(resourceHandler);
server.setHandler(context);
}
diff --git a/wagon-providers/wagon-ssh/pom.xml b/wagon-providers/wagon-ssh/pom.xml
index e1b0dcf7..0a333d8c 100644
--- a/wagon-providers/wagon-ssh/pom.xml
+++ b/wagon-providers/wagon-ssh/pom.xml
@@ -59,8 +59,8 @@ under the License.
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.aggregate</groupId>
- <artifactId>jetty-all</artifactId>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/wagon-providers/wagon-webdav-jackrabbit/pom.xml b/wagon-providers/wagon-webdav-jackrabbit/pom.xml
index 85445db1..5fc83a89 100644
--- a/wagon-providers/wagon-webdav-jackrabbit/pom.xml
+++ b/wagon-providers/wagon-webdav-jackrabbit/pom.xml
@@ -88,8 +88,18 @@ under the License.
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.aggregate</groupId>
- <artifactId>jetty-all</artifactId>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/wagon-tcks/wagon-tck-http/pom.xml b/wagon-tcks/wagon-tck-http/pom.xml
index a3ace7d1..1bd8144a 100644
--- a/wagon-tcks/wagon-tck-http/pom.xml
+++ b/wagon-tcks/wagon-tck-http/pom.xml
@@ -57,8 +57,24 @@ under the License.
<version>2.12.1</version>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.aggregate</groupId>
- <artifactId>jetty-all</artifactId>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-security</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-webapp</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
diff --git a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ServerFixture.java b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ServerFixture.java
index 45029cbb..4b4e1a17 100644
--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ServerFixture.java
+++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ServerFixture.java
@@ -28,12 +28,13 @@
import org.eclipse.jetty.security.ConstraintMapping;
import org.eclipse.jetty.security.ConstraintSecurityHandler;
import org.eclipse.jetty.security.HashLoginService;
+import org.eclipse.jetty.security.UserStore;
+import org.eclipse.jetty.security.authentication.BasicAuthenticator;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.handler.DefaultHandler;
import org.eclipse.jetty.server.handler.HandlerCollection;
-import org.eclipse.jetty.server.session.AbstractSessionManager;
import org.eclipse.jetty.server.session.SessionHandler;
import org.eclipse.jetty.servlet.FilterHolder;
import org.eclipse.jetty.servlet.FilterMapping;
@@ -69,6 +70,7 @@ public class ServerFixture {
private final WebAppContext webappContext;
private final HashLoginService loginService;
+ private final UserStore userStore;
private final ConstraintSecurityHandler securityHandler;
@@ -111,9 +113,12 @@ public ServerFixture(final boolean ssl) throws URISyntaxException, IOException {
securityHandler = new ConstraintSecurityHandler();
loginService = new HashLoginService("Test Server");
+ userStore = new UserStore();
+ loginService.setUserStore(userStore);
securityHandler.setLoginService(loginService);
securityHandler.setConstraintMappings(new ConstraintMapping[] {cm});
+ securityHandler.setAuthenticator(new BasicAuthenticator());
webappContext = new WebAppContext();
webappContext.setContextPath("/");
@@ -124,7 +129,7 @@ public ServerFixture(final boolean ssl) throws URISyntaxException, IOException {
webappContext.setHandler(securityHandler);
SessionHandler sessionHandler = webappContext.getSessionHandler();
- ((AbstractSessionManager) sessionHandler.getSessionManager()).setUsingCookies(false);
+ sessionHandler.setUsingCookies(false);
HandlerCollection handlers = new HandlerCollection();
handlers.setHandlers(new Handler[] {webappContext, new DefaultHandler()});
@@ -150,7 +155,7 @@ public void addServlet(final String pathSpec, final Servlet servlet) {
}
public void addUser(final String user, final String password) {
- loginService.putUser(user, new Password(password), new String[] {"allowed"});
+ userStore.addUser(user, new Password(password), new String[] {"allowed"});
}
public Server getServer() {