diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 515e0cf1cf..f3a0d49668 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,8 +15,8 @@ updates: # it would be good to update it at some point, but requires significant testing - dependency-name: "org.codehaus.groovy:groovy-all" versions: [">=2.5.0"] - # Must remain within Jetty 9.x until Java 8 support is removed; ignore Jetty 10.x and Jetty 11.x updates + # Must remain within Jetty 10.x until the Jakarta migration is complete; ignore Jetty 11.x updates - dependency-name: "org.eclipse.jetty:*" - versions: [">=10.0.0"] + versions: [">=11.0.0"] # Provided by the Web container, so aligned with Jetty. - - dependency-name: "javax.servlet:javax.servlet-api" + - dependency-name: "jakarta.servlet:jakarta.servlet-api" diff --git a/core/pom.xml b/core/pom.xml index 447a659781..72660b1a47 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -106,9 +106,9 @@ 9.3 - javax.servlet - javax.servlet-api - 3.1.0 + jakarta.servlet + jakarta.servlet-api + 4.0.4 provided diff --git a/core/src/test/java/org/kohsuke/stapler/MockServletContext.java b/core/src/test/java/org/kohsuke/stapler/MockServletContext.java index 2c421e7bab..830607b66c 100644 --- a/core/src/test/java/org/kohsuke/stapler/MockServletContext.java +++ b/core/src/test/java/org/kohsuke/stapler/MockServletContext.java @@ -46,7 +46,7 @@ public String getMimeType(String file) { } @Override - public Set getResourcePaths(String s) { + public Set getResourcePaths(String s) { return null; } @@ -76,12 +76,12 @@ public Servlet getServlet(String name) throws ServletException { } @Override - public Enumeration getServlets() { + public Enumeration getServlets() { return null; } @Override - public Enumeration getServletNames() { + public Enumeration getServletNames() { return null; } @@ -113,7 +113,7 @@ public String getInitParameter(String name) { } @Override - public Enumeration getInitParameterNames() { + public Enumeration getInitParameterNames() { return null; } @@ -123,7 +123,7 @@ public Object getAttribute(String name) { } @Override - public Enumeration getAttributeNames() { + public Enumeration getAttributeNames() { return null; } @@ -175,6 +175,11 @@ public Dynamic addServlet(String servletName, Class servletCl return null; } + @Override + public Dynamic addJspFile(String servletName, String jspFile) { + return null; + } + @Override public T createServlet(Class clazz) throws ServletException { return null; @@ -275,4 +280,31 @@ public void declareRoles(String... roleNames) { public String getVirtualServerName() { return null; } + + @Override + public int getSessionTimeout() { + return 0; + } + + @Override + public void setSessionTimeout(int sessionTimeout) { + } + + @Override + public String getRequestCharacterEncoding() { + return null; + } + + @Override + public void setRequestCharacterEncoding(String encoding) { + } + + @Override + public String getResponseCharacterEncoding() { + return null; + } + + @Override + public void setResponseCharacterEncoding(String encoding) { + } } diff --git a/core/src/test/java/org/kohsuke/stapler/test/JettyTestCase.java b/core/src/test/java/org/kohsuke/stapler/test/JettyTestCase.java index 75e74799d3..1e4dd21803 100644 --- a/core/src/test/java/org/kohsuke/stapler/test/JettyTestCase.java +++ b/core/src/test/java/org/kohsuke/stapler/test/JettyTestCase.java @@ -2,6 +2,9 @@ import com.gargoylesoftware.htmlunit.WebClient; import junit.framework.TestCase; +import org.eclipse.jetty.http.UriCompliance; +import org.eclipse.jetty.server.HttpConfiguration; +import org.eclipse.jetty.server.HttpConnectionFactory; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.servlet.ServletContextHandler; @@ -44,6 +47,8 @@ protected void setUp() throws Exception { server.setHandler(context); ServerConnector connector = new ServerConnector(server); + HttpConfiguration hc = connector.getConnectionFactory(HttpConnectionFactory.class).getHttpConfiguration(); + hc.setUriCompliance(UriCompliance.LEGACY); server.addConnector(connector); server.start(); diff --git a/groovy/pom.xml b/groovy/pom.xml index aa68b1c097..88c38d844d 100644 --- a/groovy/pom.xml +++ b/groovy/pom.xml @@ -28,9 +28,9 @@ true - javax.servlet - javax.servlet-api - 3.1.0 + jakarta.servlet + jakarta.servlet-api + 4.0.4 provided diff --git a/jelly/pom.xml b/jelly/pom.xml index 6532ff1050..3743f91e3f 100644 --- a/jelly/pom.xml +++ b/jelly/pom.xml @@ -25,7 +25,8 @@ org.jenkins-ci commons-jelly - 1.1-jenkins-20220625 + + 1.1-jenkins-20220626-rc106.fd0a_4a_132d80 dom4j @@ -47,9 +48,9 @@ true - javax.servlet - javax.servlet-api - 3.1.0 + jakarta.servlet + jakarta.servlet-api + 4.0.4 provided diff --git a/jrebel/pom.xml b/jrebel/pom.xml index e5cc8e4915..84753c0225 100644 --- a/jrebel/pom.xml +++ b/jrebel/pom.xml @@ -23,9 +23,9 @@ true - javax.servlet - javax.servlet-api - 3.1.0 + jakarta.servlet + jakarta.servlet-api + 4.0.4 provided diff --git a/jsp/pom.xml b/jsp/pom.xml index 0fb7508ece..d147146549 100644 --- a/jsp/pom.xml +++ b/jsp/pom.xml @@ -23,15 +23,15 @@ true - javax.servlet - javax.servlet-api - 3.1.0 + jakarta.servlet + jakarta.servlet-api + 4.0.4 provided - javax.servlet.jsp - javax.servlet.jsp-api - 2.3.3 + jakarta.servlet.jsp + jakarta.servlet.jsp-api + 2.3.6 provided diff --git a/pom.xml b/pom.xml index 2b16e407f7..c6ff929751 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 999999-SNAPSHOT HEAD ${project.basedir}/../src/spotbugs/spotbugs-excludes.xml - 9.4.48.v20220622 + 10.0.11 jenkinsci/stapler