diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index cd1f551a..acb957b0 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -5,11 +5,6 @@ updates:
schedule:
interval: "weekly"
target-branch: "master"
- ignore:
- # Restrict updates to jetty in the 10.x space
- - dependency-name: "org.eclipse.jetty:*"
- versions: [ ">=11" ]
-
- package-ecosystem: "github-actions"
directory: "/"
schedule:
diff --git a/Jenkinsfile b/Jenkinsfile
index 5fc52de4..cc6dd186 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -5,6 +5,5 @@
*/
buildPlugin(useContainerAgent: true, configurations: [
[platform: 'linux', jdk: 21],
- [platform: 'windows', jdk: 17],
- [platform: 'linux', jdk: 11]
+ [platform: 'windows', jdk: 17]
])
diff --git a/README.md b/README.md
index cf91dc88..fe83999d 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# What is Winstone?
-Winstone is a command line interface around Jetty 10.0.x, which implements
+Winstone is a command line interface around Jetty 12.0.x, which implements
Servlet 4.0 (JakartaEE 8/`javax.servlet.*`), WebSocket/JSR-356, and HTTP/2 support. It is used as the default
embedded servlet container in Jenkins (via the `executable` package in the `war` module)
and can be used by any other web applications that wants to be self-contained.
diff --git a/pom.xml b/pom.xml
index 51030d77..d966db1d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,14 +35,12 @@
- 6.22
+ 7.0
-SNAPSHOT
- 10.0.22
+ 12.0.12
2.0.16
jenkinsci/winstone
false
-
- 11
@@ -54,6 +52,13 @@
pom
import
+
+ org.eclipse.jetty.ee8
+ jetty-ee8-bom
+ ${jetty.version}
+ pom
+ import
+
org.slf4j
@@ -101,10 +106,6 @@
org.eclipse.jetty
jetty-server
-
- org.eclipse.jetty
- jetty-servlet
-
org.eclipse.jetty
jetty-unixdomain-server
@@ -114,21 +115,25 @@
jetty-util
- org.eclipse.jetty
- jetty-webapp
+ org.eclipse.jetty.ee8
+ jetty-ee8-servlet
- org.eclipse.jetty.http2
- http2-hpack
+ org.eclipse.jetty.ee8
+ jetty-ee8-webapp
+
+
+ org.eclipse.jetty.ee8.websocket
+ jetty-ee8-websocket-jetty-server
+
org.eclipse.jetty.http2
- http2-server
+ jetty-http2-hpack
- org.eclipse.jetty.websocket
- websocket-jetty-server
-
+ org.eclipse.jetty.http2
+ jetty-http2-server
org.slf4j
diff --git a/src/main/java/winstone/HostConfiguration.java b/src/main/java/winstone/HostConfiguration.java
index 6c1effbd..fca6314c 100644
--- a/src/main/java/winstone/HostConfiguration.java
+++ b/src/main/java/winstone/HostConfiguration.java
@@ -30,15 +30,12 @@
import java.util.jar.JarFile;
import java.util.logging.Level;
import javax.servlet.SessionTrackingMode;
-import org.eclipse.jetty.http.MimeTypes;
+import org.eclipse.jetty.ee8.webapp.WebAppContext;
+import org.eclipse.jetty.ee8.websocket.server.config.JettyWebSocketServletContainerInitializer;
import org.eclipse.jetty.security.LoginService;
-import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.RequestLog;
import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.handler.RequestLogHandler;
import org.eclipse.jetty.server.handler.gzip.GzipHandler;
-import org.eclipse.jetty.webapp.WebAppContext;
-import org.eclipse.jetty.websocket.server.config.JettyWebSocketServletContainerInitializer;
import winstone.cmdline.CompressionScheme;
import winstone.cmdline.Option;
@@ -55,7 +52,6 @@ public class HostConfiguration {
private Map args;
private Map webapps;
private ClassLoader commonLibCL;
- private MimeTypes mimeTypes = new MimeTypes();
private final LoginService loginService;
public HostConfiguration(Server server, String hostname, ClassLoader commonLibCL, @NonNull Map args)
@@ -85,7 +81,11 @@ public HostConfiguration(Server server, String hostname, ClassLoader commonLibCL
// trim off the trailing '/' that Jetty doesn't like
prefix = prefix.substring(0, prefix.length() - 1);
}
- Handler handler = configureAccessLog(create(getWebRoot(webroot, warfile), prefix), "webapp");
+ WebAppContext webAppContext = create(getWebRoot(webroot, warfile), prefix);
+ RequestLog requestLog = configureAccessLog("webapp");
+ if (requestLog != null) {
+ server.setRequestLog(requestLog);
+ }
{ // load additional mime types
loadBuiltinMimeTypes();
@@ -100,7 +100,7 @@ public HostConfiguration(Server server, String hostname, ClassLoader commonLibCL
}
String extension = mapping.substring(0, delimPos);
String mimeType = mapping.substring(delimPos + 1);
- this.mimeTypes.addMimeMapping(extension.toLowerCase(), mimeType);
+ server.getMimeTypes().addMimeMapping(extension.toLowerCase(), mimeType);
}
}
}
@@ -109,11 +109,11 @@ public HostConfiguration(Server server, String hostname, ClassLoader commonLibCL
switch (compressionScheme) {
case GZIP:
GzipHandler gzipHandler = new GzipHandler();
- gzipHandler.setHandler(handler);
+ gzipHandler.setHandler(webAppContext);
server.setHandler(gzipHandler);
break;
case NONE:
- server.setHandler(handler);
+ server.setHandler(webAppContext);
break;
default:
throw new IllegalArgumentException("Unexpected compression scheme: " + compressionScheme);
@@ -132,7 +132,8 @@ private void loadBuiltinMimeTypes() {
Properties props = new Properties();
props.load(in);
for (Entry