diff --git a/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/pom.xml b/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/pom.xml
index 6f13aa19af27..ecd5364dea3d 100644
--- a/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/pom.xml
@@ -48,10 +48,11 @@
xwiki-platform-tika-detect
${project.version}
-
- javax.servlet
- javax.servlet-api
+
+ jakarta.servlet
+ jakarta.servlet-api
+
org.xwiki.commons
diff --git a/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/src/main/java/org/xwiki/resource/servlet/AbstractServletResourceReferenceHandler.java b/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/src/main/java/org/xwiki/resource/servlet/AbstractServletResourceReferenceHandler.java
index 7cdb6d3004be..374304fa83c4 100644
--- a/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/src/main/java/org/xwiki/resource/servlet/AbstractServletResourceReferenceHandler.java
+++ b/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/src/main/java/org/xwiki/resource/servlet/AbstractServletResourceReferenceHandler.java
@@ -27,9 +27,6 @@
import java.util.Date;
import java.util.Objects;
-import javax.inject.Inject;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpHeaders;
@@ -48,6 +45,9 @@
import org.xwiki.resource.ResourceType;
import org.xwiki.tika.internal.TikaUtils;
+import jakarta.inject.Inject;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* Base class for {@link ResourceReferenceHandler}s that can handle servlet resource requests.
*
@@ -122,18 +122,19 @@ private boolean shouldBrowserUseCachedContent(R resourceReference)
// If the request contains an "If-Modified-Since" header and the requested resource has not been modified then
// return a 304 Not Modified to tell the browser to use its cached version.
Request request = this.container.getRequest();
- if (request instanceof ServletRequest
- && ((ServletRequest) request).getHttpServletRequest().getHeader("If-Modified-Since") != null
- && isResourceCacheable(resourceReference))
- {
+ if (request instanceof ServletRequest servletRequest
+ && servletRequest.getJakartaHttpServletRequest().getHeader("If-Modified-Since") != null
+ && isResourceCacheable(resourceReference)) {
// The user probably used F5 to reload the page and the browser checks if there are changes.
Response response = this.container.getResponse();
- if (response instanceof ServletResponse) {
+ if (response instanceof ServletResponse servletResponse) {
// Return the 304 Not Modified.
- ((ServletResponse) response).getHttpServletResponse().setStatus(HttpServletResponse.SC_NOT_MODIFIED);
+ servletResponse.getJakartaHttpServletResponse().setStatus(HttpServletResponse.SC_NOT_MODIFIED);
+
return true;
}
}
+
return false;
}
@@ -169,7 +170,7 @@ private void serveResource(R resourceReference, InputStream rawResourceStream)
throws ResourceReferenceHandlerException
{
InputStream resourceStream = rawResourceStream;
-
+
// Make sure the resource stream supports mark & reset which is needed in order be able to detect the
// content type without affecting the stream (Tika may need to read a few bytes from the start of the
// stream, in which case it will mark & reset the stream).
@@ -189,8 +190,8 @@ private void serveResource(R resourceReference, InputStream rawResourceStream)
}
/**
- * Computes the content type of the resource. By default the content type is inferred by {@link
- * TikaUtils#detect(InputStream, String)} based on the resource content and name.
+ * Computes the content type of the resource. By default the content type is inferred by
+ * {@link TikaUtils#detect(InputStream, String)} based on the resource content and name.
*
* @param resourceStream the stream of the requested resource
* @param resourceReference the reference of the request resource
@@ -198,8 +199,7 @@ private void serveResource(R resourceReference, InputStream rawResourceStream)
* @throws IOException in case of error during the content type analysis
* @since 13.3RC1
*/
- protected String getContentType(InputStream resourceStream, R resourceReference)
- throws IOException
+ protected String getContentType(InputStream resourceStream, R resourceReference) throws IOException
{
return TikaUtils.detect(resourceStream, getResourceName(resourceReference));
}
@@ -228,7 +228,7 @@ private void setResponseHeaders(Response response, R resourceReference)
if (!(response instanceof ServletResponse)) {
return;
}
- HttpServletResponse httpResponse = ((ServletResponse) response).getHttpServletResponse();
+ HttpServletResponse httpResponse = ((ServletResponse) response).getJakartaHttpServletResponse();
// Cache the resource if possible.
if (isResourceCacheable(resourceReference)) {
@@ -288,8 +288,9 @@ private void sendError(int statusCode, String message, Object... parameters)
throws ResourceReferenceHandlerException
{
Response response = this.container.getResponse();
- if (response instanceof ServletResponse) {
- HttpServletResponse httpResponse = ((ServletResponse) response).getHttpServletResponse();
+ if (response instanceof ServletResponse servletResponse) {
+ HttpServletResponse httpResponse = servletResponse.getJakartaHttpServletResponse();
+
try {
httpResponse.sendError(statusCode, String.format(message, parameters));
} catch (IOException e) {
diff --git a/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/src/main/java/org/xwiki/resource/servlet/ResourceReferenceHandlerServlet.java b/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/src/main/java/org/xwiki/resource/servlet/ResourceReferenceHandlerServlet.java
index c0b733882a84..00ec33ca78a0 100644
--- a/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/src/main/java/org/xwiki/resource/servlet/ResourceReferenceHandlerServlet.java
+++ b/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/src/main/java/org/xwiki/resource/servlet/ResourceReferenceHandlerServlet.java
@@ -23,11 +23,6 @@
import java.lang.reflect.Type;
import java.util.Collections;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.xwiki.component.manager.ComponentLookupException;
import org.xwiki.component.manager.ComponentManager;
import org.xwiki.component.util.DefaultParameterizedType;
@@ -42,14 +37,22 @@
import org.xwiki.resource.ResourceType;
import org.xwiki.url.ExtendedURL;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* Handles any Resource Reference discovered by the Routing Filter and put in the HTTP Request. Any module who wish to
* add a new Resource Type in the XWiki URL simply needs to register a Handler component (of role
* {@link org.xwiki.resource.ResourceReferenceHandler}) and any URL matching the corresponding {@link ResourceType} will
* be handled.
+ *
+ * While the class is much older, the since annotation was moved to 42.0.0 because it implements a completely
+ * different API from Java point of view.
*
* @version $Id$
- * @since 7.1M1
+ * @since 42.0.0
*/
public class ResourceReferenceHandlerServlet extends HttpServlet
{
@@ -58,7 +61,7 @@ public class ResourceReferenceHandlerServlet extends HttpServlet
*/
private static final long serialVersionUID = 1L;
- private ComponentManager rootComponentManager;
+ private transient ComponentManager rootComponentManager;
@Override
public void init() throws ServletException
@@ -136,9 +139,7 @@ private void initializeContainerComponent(HttpServletRequest httpRequest, HttpSe
throw new ServletException("Failed to locate a ServletContainerInitializer component", e);
}
try {
- containerInitializer.initializeRequest(httpRequest);
- containerInitializer.initializeResponse(httpResponse);
- containerInitializer.initializeSession(httpRequest);
+ containerInitializer.initializeRequest(httpRequest, httpResponse);
} catch (ServletContainerException e) {
throw new ServletException("Failed to initialize Request/Response or Session", e);
}
diff --git a/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/src/main/java/org/xwiki/resource/servlet/RoutingFilter.java b/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/src/main/java/org/xwiki/resource/servlet/RoutingFilter.java
index 96683321275a..b2fa1d1456f2 100644
--- a/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/src/main/java/org/xwiki/resource/servlet/RoutingFilter.java
+++ b/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/src/main/java/org/xwiki/resource/servlet/RoutingFilter.java
@@ -24,14 +24,14 @@
import java.net.URL;
import java.util.Collections;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.FilterConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.xwiki.component.manager.ComponentLookupException;
@@ -46,23 +46,26 @@
/**
* Decides how to route an incoming URL into the XWiki system. There are various possibilities:
*
- * - If there's a registered component of type {@link org.xwiki.resource.ResourceReferenceHandler} matching the
- * {@link ResourceType} passed in the URL (for example when using the {@code standard} URL scheme, the Resource
- * Type is the segment path just after the Context Path, i.e. {@code bin} in
- * {@code http:///xwiki/bin/view/Space/Page}), then the {@code resourceReferenceHandler} Servlet is
- * called to handle it.
- * - If not, then continue executing the rest of the {@code web.xml} file, thus bridging to the old system,
- * including the existing Struts Action Servlet.
+ * - If there's a registered component of type {@link org.xwiki.resource.ResourceReferenceHandler} matching the
+ * {@link ResourceType} passed in the URL (for example when using the {@code standard} URL scheme, the Resource Type is
+ * the segment path just after the Context Path, i.e. {@code bin} in {@code http:///xwiki/bin/view/Space/Page}),
+ * then the {@code resourceReferenceHandler} Servlet is called to handle it.
+ * - If not, then continue executing the rest of the {@code web.xml} file, thus bridging to the old system, including
+ * the existing Struts Action Servlet.
*
* As time progresses it is expected that more and more Resource Types will have registered
* {@link org.xwiki.resource.ResourceReferenceHandler}.
+ *
+ * While the class is much older, the since annotation was moved to 42.0.0 because it implement a completely different
+ * API from Java point of view.
*
* @version $Id$
- * @since 7.1M1
+ * @since 42.0.0
*/
public class RoutingFilter implements Filter
{
static final String RESOURCE_TYPE_NAME = "resourceType";
+
static final String RESOURCE_EXTENDEDURL = "resourceURL";
private ComponentManager rootComponentManager;
@@ -169,8 +172,8 @@ private ResourceTypeResolver getResourceTypeResolver() throws Servl
{
ResourceTypeResolver urlResourceTypeResolver;
try {
- urlResourceTypeResolver = this.rootComponentManager.getInstance(
- new DefaultParameterizedType(null, ResourceTypeResolver.class, ExtendedURL.class));
+ urlResourceTypeResolver = this.rootComponentManager
+ .getInstance(new DefaultParameterizedType(null, ResourceTypeResolver.class, ExtendedURL.class));
} catch (ComponentLookupException e) {
// Should not happen since an ExtendedURL Resource Type Resolver should exist on the system.
throw new ServletException("Failed to locate an ExtendedURL Resource Type Resolver component", e);
@@ -208,7 +211,8 @@ private URL getRequestURL(HttpServletRequest request) throws ServletException
// Shouldn't happen normally!
throw new ServletException(
String.format("Failed to reconstruct URL from HTTP Servlet Request (URL [%s], Query String [%s])",
- request.getRequestURL(), request.getQueryString()), e);
+ request.getRequestURL(), request.getQueryString()),
+ e);
}
return url;
}
diff --git a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/pom.xml b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/pom.xml
index 411202419ed7..443b7c5bb5e9 100644
--- a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/pom.xml
@@ -84,8 +84,13 @@
aopalliance
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
+
+
+ org.xwiki.commons
+ xwiki-commons-jakartabridge-servlet
+ ${commons.version}
diff --git a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/JerseyServletContainer.java b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/JerseyServletContainer.java
index 630611267ede..aaa994920a13 100644
--- a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/JerseyServletContainer.java
+++ b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/JerseyServletContainer.java
@@ -24,28 +24,32 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.inject.Singleton;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServlet;
-
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.servlet.ServletContainer;
import org.xwiki.component.annotation.Component;
import org.xwiki.component.descriptor.ComponentDescriptor;
import org.xwiki.component.manager.ComponentManager;
+import org.xwiki.jakartabridge.servlet.JakartaServletBridge;
import org.xwiki.rest.XWikiRestComponent;
+import jakarta.inject.Inject;
+import jakarta.inject.Named;
+import jakarta.inject.Singleton;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServlet;
+
/**
* Encapsulate the Jersey {@link ServletContainer} to control it's initialization and reload (when a REST component is
* registered/unregistered).
+ *
+ * While the class is much older, the since annotation was moved to 42.0.0 because it implement a completely different
+ * API from Java point of view.
*
* @version $Id$
- * @since 16.2.0RC1
+ * @since 42.0.0
*/
@Component(roles = JerseyServletContainer.class)
@Singleton
@@ -66,7 +70,11 @@ public void init() throws ServletException
{
// Create and initialize the Jersey servlet
ServletContainer newContainer = new ServletContainer(createResourceConfig());
- newContainer.init(getServletConfig());
+ try {
+ newContainer.init(JakartaServletBridge.toJavax(getServletConfig()));
+ } catch (javax.servlet.ServletException e) {
+ throw new ServletException(e);
+ }
// Remember the previous container
ServletContainer previousContainer = this.container;
@@ -128,7 +136,9 @@ public void service(ServletRequest req, ServletResponse res) throws ServletExcep
try {
// Execute the request
- this.container.service(req, res);
+ this.container.service(JakartaServletBridge.toJavax(req), JakartaServletBridge.toJavax(res));
+ } catch (javax.servlet.ServletException e) {
+ throw new ServletException(e);
} finally {
// Decrement the counter
counter.decrementAndGet();
@@ -159,6 +169,6 @@ public void destroy()
@Override
public ServletContext getServletContext()
{
- return this.container.getServletContext();
+ return JakartaServletBridge.toJakarta(this.container.getServletContext());
}
}
diff --git a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/XWikiRESTServlet.java b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/XWikiRESTServlet.java
index b433c07cbc31..9051119406c9 100644
--- a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/XWikiRESTServlet.java
+++ b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-jersey/src/main/java/org/xwiki/rest/jersey/internal/XWikiRESTServlet.java
@@ -21,25 +21,28 @@
import java.io.IOException;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServlet;
-
import org.glassfish.jersey.servlet.ServletContainer;
import org.glassfish.jersey.servlet.ServletProperties;
import org.xwiki.component.manager.ComponentLookupException;
import org.xwiki.component.manager.ComponentManager;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServlet;
+
/**
* Extends {@link ServletContainer} to add XWiki specific pieces.
*
* - Injection of XWikiResource components
*
+ *
+ * While the class is much older, the since annotation was moved to 42.0.0 because it implement a completely different
+ * API from Java point of view.
*
* @version $Id$
- * @since 16.2.0RC1
+ * @since 42.0.0
*/
public class XWikiRESTServlet extends HttpServlet
{
diff --git a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/pom.xml b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/pom.xml
index 2c6eb9fd608b..26e909739050 100644
--- a/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/pom.xml
@@ -129,6 +129,10 @@
javax.servlet
javax.servlet-api
+
+ jakarta.servlet
+ jakarta.servlet-api
+
org.xwiki.platform
diff --git a/xwiki-platform-core/xwiki-platform-scheduler/xwiki-platform-scheduler-api/pom.xml b/xwiki-platform-core/xwiki-platform-scheduler/xwiki-platform-scheduler-api/pom.xml
index 81e8b42c14ee..f11f7aca06e7 100644
--- a/xwiki-platform-core/xwiki-platform-scheduler/xwiki-platform-scheduler-api/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-scheduler/xwiki-platform-scheduler-api/pom.xml
@@ -47,8 +47,8 @@
quartz
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
org.xwiki.platform
diff --git a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/pom.xml b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/pom.xml
index a9eed7936a46..6402cbffada3 100644
--- a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/pom.xml
@@ -134,11 +134,6 @@
${commons.version}
test
-
- javax.servlet
- javax.servlet-api
- test
-
org.xwiki.platform
xwiki-platform-test-oldcore
diff --git a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-api/pom.xml b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-api/pom.xml
index f9b75b45624d..e39660077517 100644
--- a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-api/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-api/pom.xml
@@ -77,8 +77,13 @@
${project.version}
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
+
+
+ org.xwiki.commons
+ xwiki-commons-jakartabridge-servlet
+ ${commons.version}
diff --git a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-api/src/main/java/org/xwiki/security/authentication/AuthenticationFailureManager.java b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-api/src/main/java/org/xwiki/security/authentication/AuthenticationFailureManager.java
index 33318e7dd175..8a3db61c99cd 100644
--- a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-api/src/main/java/org/xwiki/security/authentication/AuthenticationFailureManager.java
+++ b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-api/src/main/java/org/xwiki/security/authentication/AuthenticationFailureManager.java
@@ -19,10 +19,12 @@
*/
package org.xwiki.security.authentication;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
import org.xwiki.component.annotation.Role;
+import org.xwiki.jakartabridge.servlet.JakartaServletBridge;
import org.xwiki.model.reference.DocumentReference;
+import org.xwiki.stability.Unstable;
/**
* Manager of the authentication failures strategies.
@@ -35,12 +37,33 @@ public interface AuthenticationFailureManager
{
/**
* Record that the given username fails to authenticate.
+ *
* @param username the username that fails the authentication. Should be the username typed by the user and not a
- * computed login.
+ * computed login.
* @param request a wrapping of the request used for the authentication.
* @return true if the authentication failure limits defined by the configuration has been reached.
+ * @deprecated use {@link #recordAuthenticationFailure(String, HttpServletRequest)}
*/
- boolean recordAuthenticationFailure(String username, HttpServletRequest request);
+ @Deprecated(since = "42.0.0")
+ default boolean recordAuthenticationFailure(String username, javax.servlet.http.HttpServletRequest request)
+ {
+ return recordAuthenticationFailure(username, JakartaServletBridge.toJakarta(request));
+ }
+
+ /**
+ * Record that the given username fails to authenticate.
+ *
+ * @param username the username that fails the authentication. Should be the username typed by the user and not a
+ * computed login.
+ * @param request a wrapping of the request used for the authentication.
+ * @return true if the authentication failure limits defined by the configuration has been reached.
+ * @since 42.0.0
+ */
+ @Unstable
+ default boolean recordAuthenticationFailure(String username, HttpServletRequest request)
+ {
+ return recordAuthenticationFailure(username, JakartaServletBridge.toJavax(request));
+ }
/**
* Remove all records of authentication failure for the given user.
@@ -56,19 +79,62 @@ public interface AuthenticationFailureManager
* not a computed login.
* @param request a wrapping of the request used for the authentication.
* @return the aggregated form information to add to the standard login form, or an empty string.
+ * @deprecated use {@link #getForm(String, HttpServletRequest)} instead
+ */
+ @Deprecated(since = "42.0.0")
+ default String getForm(String username, javax.servlet.http.HttpServletRequest request)
+ {
+ return getForm(username, JakartaServletBridge.toJakarta(request));
+ }
+
+ /**
+ * If the user reached the authentication failure limit, aggregate form information returned by the different
+ * strategies (see {@link AuthenticationFailureStrategy#getForm(String)}). Else return an empty string.
+ * @param username the username that is used for the authentication. Should be the username typed by the user and
+ * not a computed login.
+ * @param request a wrapping of the request used for the authentication.
+ * @return the aggregated form information to add to the standard login form, or an empty string.
+ * @since 42.0.0
*/
- String getForm(String username, HttpServletRequest request);
+ @Unstable
+ default String getForm(String username, HttpServletRequest request)
+ {
+ return getForm(username, JakartaServletBridge.toJavax(request));
+ }
/**
* If the user reached the authentication failure limit, validate the form information against the different
- * strategies used and return the result
- * (see {@link AuthenticationFailureStrategy#validateForm(String, HttpServletRequest)}). Else returns true.
+ * strategies used and return the result (see
+ * {@link AuthenticationFailureStrategy#validateForm(String, HttpServletRequest)}). Else returns true.
+ *
* @param username the username that is used for the authentication. Should be the username typed by the user and
- * not a computed login.
+ * not a computed login.
+ * @param request a wrapping of the request used for the authentication.
+ * @return true if all strategies validate the request or if the user didn't reach the limit.
+ * @deprecated use {@link #validateForm(String, HttpServletRequest)} instead
+ */
+ @Deprecated(since = "42.0.0")
+ default boolean validateForm(String username, javax.servlet.http.HttpServletRequest request)
+ {
+ return validateForm(username, JakartaServletBridge.toJakarta(request));
+ }
+
+ /**
+ * If the user reached the authentication failure limit, validate the form information against the different
+ * strategies used and return the result (see
+ * {@link AuthenticationFailureStrategy#validateForm(String, HttpServletRequest)}). Else returns true.
+ *
+ * @param username the username that is used for the authentication. Should be the username typed by the user and
+ * not a computed login.
* @param request a wrapping of the request used for the authentication.
* @return true if all strategies validate the request or if the user didn't reach the limit.
+ * @since 42.0.0
*/
- boolean validateForm(String username, HttpServletRequest request);
+ @Unstable
+ default boolean validateForm(String username, HttpServletRequest request)
+ {
+ return validateForm(username, JakartaServletBridge.toJavax(request));
+ }
/**
* If the user reached the authentication failure limit, aggregate the error message of the different strategies
diff --git a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-api/src/main/java/org/xwiki/security/authentication/AuthenticationFailureStrategy.java b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-api/src/main/java/org/xwiki/security/authentication/AuthenticationFailureStrategy.java
index a57f5b319fba..1abca3995d49 100644
--- a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-api/src/main/java/org/xwiki/security/authentication/AuthenticationFailureStrategy.java
+++ b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-api/src/main/java/org/xwiki/security/authentication/AuthenticationFailureStrategy.java
@@ -19,9 +19,11 @@
*/
package org.xwiki.security.authentication;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
import org.xwiki.component.annotation.Role;
+import org.xwiki.jakartabridge.servlet.JakartaServletBridge;
+import org.xwiki.stability.Unstable;
/**
* Describes a strategy to perform in case the limit of authentication failures is reached.
@@ -57,8 +59,25 @@ public interface AuthenticationFailureStrategy
* @param username the username used for the authentication failure.
* @param request the authentication request.
* @return true if the authentication request can be validated, i.e. if the user should be authorized to login.
+ * @deprecated use {@link #validateForm(String, HttpServletRequest)} instead
*/
- boolean validateForm(String username, HttpServletRequest request);
+ @Deprecated(since = "42.0.0")
+ default boolean validateForm(String username, javax.servlet.http.HttpServletRequest request)
+ {
+ return validateForm(username, JakartaServletBridge.toJakarta(request));
+ }
+
+ /**
+ * @param username the username used for the authentication failure.
+ * @param request the authentication request.
+ * @return true if the authentication request can be validated, i.e. if the user should be authorized to login.
+ * @since 42.0.0
+ */
+ @Unstable
+ default boolean validateForm(String username, HttpServletRequest request)
+ {
+ return validateForm(username, JakartaServletBridge.toJavax(request));
+ }
/**
* Notify the strategy about an authentication failure limit reached.
diff --git a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/pom.xml b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/pom.xml
index 1c88419398d4..3588219f20d2 100644
--- a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/pom.xml
@@ -31,7 +31,7 @@
Default implementation of the Authentication API
${basedir}/src/checkstyle/checkstyle-suppressions.xml
- 0.80
+ 0.79
Authentication API Implementation
@@ -78,8 +78,8 @@
${project.version}
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
diff --git a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/CaptchaAuthenticationFailureStrategy.java b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/CaptchaAuthenticationFailureStrategy.java
index 965a00579ce7..0aa393e1cb94 100644
--- a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/CaptchaAuthenticationFailureStrategy.java
+++ b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/CaptchaAuthenticationFailureStrategy.java
@@ -25,7 +25,6 @@
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
-import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.slf4j.Logger;
@@ -38,10 +37,11 @@
import org.xwiki.localization.ContextualLocalizationManager;
import org.xwiki.security.authentication.AuthenticationFailureStrategy;
+import jakarta.servlet.http.HttpServletRequest;
+
/**
- * Captcha Strategy for repeated authentication failures.
- * The main idea of this strategy is to add a captcha form field in the login form and to ask user to fill it for
- * validating their authentication.
+ * Captcha Strategy for repeated authentication failures. The main idea of this strategy is to add a captcha form field
+ * in the login form and to ask user to fill it for validating their authentication.
*
* @version $Id$
* @since 11.6RC1
@@ -54,8 +54,8 @@ public class CaptchaAuthenticationFailureStrategy implements AuthenticationFailu
/**
* Exception message thrown by jCaptcha library when no captcha is registered for the session id.
*/
- private static final String UNEXISTING_CAPTCHA_EXCEPTION = "Invalid ID, could not validate unexisting or already "
- + "validated captcha";
+ private static final String UNEXISTING_CAPTCHA_EXCEPTION =
+ "Invalid ID, could not validate unexisting or already " + "validated captcha";
@Inject
private CaptchaConfiguration captchaConfiguration;
diff --git a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/DefaultAuthenticationFailureManager.java b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/DefaultAuthenticationFailureManager.java
index 2a8359b30f68..5e055761601d 100644
--- a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/DefaultAuthenticationFailureManager.java
+++ b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/DefaultAuthenticationFailureManager.java
@@ -32,7 +32,6 @@
import javax.inject.Named;
import javax.inject.Provider;
import javax.inject.Singleton;
-import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@@ -58,6 +57,8 @@
import com.xpn.xwiki.XWikiContext;
import com.xpn.xwiki.user.api.XWikiUser;
+import jakarta.servlet.http.HttpServletRequest;
+
/**
* Default implementation for {@link AuthenticationFailureManager}.
*
@@ -134,8 +135,8 @@ private void buildStrategyList()
this.failureStrategyList = new LinkedList<>();
for (String failureStrategyName : this.failureStrategyNames) {
try {
- this.failureStrategyList.add(this.componentManager.getInstance(AuthenticationFailureStrategy.class,
- failureStrategyName));
+ this.failureStrategyList
+ .add(this.componentManager.getInstance(AuthenticationFailureStrategy.class, failureStrategyName));
} catch (ComponentLookupException e) {
logger.error("Error while getting authentication failure strategy [{}]. ", failureStrategyName, e);
}
@@ -156,9 +157,7 @@ private boolean isAuthenticationSecurityEnabled()
{
// historically the feature was considered as disabled if max attempts = 0, max time = 0 or the strategy list
// was empty. We keep that as possible way to say it's disabled.
- return configuration.isAuthenticationSecurityEnabled()
- && getMaxNbAttempts() != 0
- && getMaxTime() != 0
+ return configuration.isAuthenticationSecurityEnabled() && getMaxNbAttempts() != 0 && getMaxTime() != 0
&& !getFailureStrategyList().isEmpty();
}
@@ -169,9 +168,9 @@ private void clearRecords()
}
/**
- * Determine which username we should skip.
- * We don't handle empty usernames to avoid triggering the security mechanism for nothing and having unexpected
- * behaviours.
+ * Determine which username we should skip. We don't handle empty usernames to avoid triggering the security
+ * mechanism for nothing and having unexpected behaviours.
+ *
* @param username the username to check.
* @return {@code true} if the username is empty.
*/
@@ -350,14 +349,14 @@ private int getMaxNbAttempts()
}
/**
- * This class aims at storing the authentication failure record information about a login.
- * It only stores the first failing date and the number of failing attempts since then.
- * Those two are resetted if another failure happens outside of the given time window.
- * (See {@link AuthenticationConfiguration#getTimeWindow()})
+ * This class aims at storing the authentication failure record information about a login. It only stores the first
+ * failing date and the number of failing attempts since then. Those two are resetted if another failure happens
+ * outside of the given time window. (See {@link AuthenticationConfiguration#getTimeWindow()})
*/
class AuthFailureRecord
{
private long firstFailingDate;
+
private int nbAttempts;
AuthFailureRecord()
@@ -374,12 +373,12 @@ void incrementAttemptOrReset()
this.firstFailingDate = new Date().getTime();
this.nbAttempts++;
- // If the threshold not reached yet and we're out of the time window, we can reset the data.
+ // If the threshold not reached yet and we're out of the time window, we can reset the data.
} else if (firstFailingDate + getMaxTime() < new Date().getTime()) {
this.firstFailingDate = new Date().getTime();
this.nbAttempts = 1;
- // Else the threshold not reached but we are in the time window: we increment the number of attempts.
+ // Else the threshold not reached but we are in the time window: we increment the number of attempts.
} else {
this.nbAttempts++;
}
diff --git a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/DisableAccountFailureStrategy.java b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/DisableAccountFailureStrategy.java
index 38cff2df7285..1e71b99a025a 100644
--- a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/DisableAccountFailureStrategy.java
+++ b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/DisableAccountFailureStrategy.java
@@ -26,7 +26,6 @@
import javax.inject.Named;
import javax.inject.Provider;
import javax.inject.Singleton;
-import javax.servlet.http.HttpServletRequest;
import org.xwiki.bridge.event.DocumentUpdatedEvent;
import org.xwiki.component.annotation.Component;
@@ -45,6 +44,8 @@
import com.xpn.xwiki.objects.BaseObject;
import com.xpn.xwiki.user.api.XWikiUser;
+import jakarta.servlet.http.HttpServletRequest;
+
/**
* A strategy to disable authentication in case of repeated failure with a login.
*
@@ -109,6 +110,7 @@ public boolean validateForm(String username, HttpServletRequest request)
if (userDocumentReference != null) {
return !new XWikiUser(userDocumentReference).isDisabled(this.contextProvider.get());
}
+
return false;
}
diff --git a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/test/java/org/xwiki/security/authentication/internal/DefaultAuthenticationFailureManagerTest.java b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/test/java/org/xwiki/security/authentication/internal/DefaultAuthenticationFailureManagerTest.java
index c37fed206dd5..22d4e5972686 100644
--- a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/test/java/org/xwiki/security/authentication/internal/DefaultAuthenticationFailureManagerTest.java
+++ b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/test/java/org/xwiki/security/authentication/internal/DefaultAuthenticationFailureManagerTest.java
@@ -25,8 +25,8 @@
import javax.inject.Named;
import javax.inject.Provider;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpSession;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -74,7 +74,7 @@
* @since 11.6RC1
*/
@ComponentTest
-public class DefaultAuthenticationFailureManagerTest
+class DefaultAuthenticationFailureManagerTest
{
@InjectMockComponents
private DefaultAuthenticationFailureManager defaultAuthenticationFailureManager;
@@ -163,7 +163,7 @@ private HttpServletRequest getRequest(String sessionId)
* Ensure that a AuthenticationFailureEvent is triggered.
*/
@Test
- public void authenticationFailureIsTriggered()
+ void authenticationFailureIsTriggered()
{
assertFalse(this.defaultAuthenticationFailureManager.recordAuthenticationFailure(this.failingLogin,
getRequest("something")));
@@ -234,7 +234,7 @@ void authenticationFailureEmptyLogin()
* Ensure that the time window configuration is taken into account properly.
*/
@Test
- public void repeatedAuthenticationFailureOutOfTimeWindow() throws InterruptedException
+ void repeatedAuthenticationFailureOutOfTimeWindow() throws InterruptedException
{
HttpServletRequest request = getRequest("anotherId");
when(configuration.getTimeWindow()).thenReturn(1);
@@ -258,7 +258,7 @@ public void repeatedAuthenticationFailureOutOfTimeWindow() throws InterruptedExc
* Ensure that the max attempt configuration is taken into account properly.
*/
@Test
- public void repeatedAuthenticationFailureDifferentThreshold()
+ void repeatedAuthenticationFailureDifferentThreshold()
{
HttpServletRequest request = getRequest("foobar");
when(configuration.getMaxAuthorizedAttempts()).thenReturn(5);
@@ -281,7 +281,7 @@ public void repeatedAuthenticationFailureDifferentThreshold()
* Ensure that the failure record reset is working properly.
*/
@Test
- public void resetAuthFailureRecord()
+ void resetAuthFailureRecord()
{
HttpServletRequest request = getRequest("reset");
assertFalse(this.defaultAuthenticationFailureManager.recordAuthenticationFailure(this.failingLogin, request));
@@ -304,7 +304,7 @@ public void resetAuthFailureRecord()
* Ensure that the failure record reset is working properly.
*/
@Test
- public void resetAuthFailureRecordWithDocumentReference()
+ void resetAuthFailureRecordWithDocumentReference()
{
HttpServletRequest request = getRequest("reset2");
assertFalse(this.defaultAuthenticationFailureManager.recordAuthenticationFailure(this.failingLogin, request));
@@ -327,7 +327,7 @@ public void resetAuthFailureRecordWithDocumentReference()
* Ensure that the threshold mechanism works properly with different login.
*/
@Test
- public void recordAuthFailureDifferentLogin()
+ void recordAuthFailureDifferentLogin()
{
HttpServletRequest request = getRequest("multilogin");
String login1 = this.failingLogin.toLowerCase();
@@ -390,7 +390,7 @@ void recordAuthenticationFailureWithFailingSession()
* Ensure that the authentication threshold auth is deactivated if max attempt is set to 0
*/
@Test
- public void deactivateThresholdAuthWithMaxAttempt()
+ void deactivateThresholdAuthWithMaxAttempt()
{
HttpServletRequest request = getRequest("manyattempt");
when(this.configuration.getMaxAuthorizedAttempts()).thenReturn(0);
@@ -410,7 +410,7 @@ public void deactivateThresholdAuthWithMaxAttempt()
* Ensure that the authentication threshold auth is deactivated if time window is set to 0
*/
@Test
- public void deactivateThresholdAuthWithTimeWindow()
+ void deactivateThresholdAuthWithTimeWindow()
{
HttpServletRequest request = getRequest("manyattempt2");
when(this.configuration.getTimeWindow()).thenReturn(0);
@@ -430,7 +430,7 @@ public void deactivateThresholdAuthWithTimeWindow()
* Validate that getForm is working properly.
*/
@Test
- public void getForm()
+ void getForm()
{
HttpServletRequest request = getRequest("getForm");
String formStrategy1 = "formStrategy1";
@@ -468,7 +468,7 @@ void getFormFailingSession()
* Validate that getErrorMessages is working properly.
*/
@Test
- public void getErrorMessages()
+ void getErrorMessages()
{
HttpServletRequest request = getRequest("errorMsg");
String errorMessage1 = "errorMessage1";
@@ -489,7 +489,7 @@ public void getErrorMessages()
* Validate that getForm is working properly.
*/
@Test
- public void validateForm()
+ void validateForm()
{
HttpServletRequest request = getRequest("validate");
String login1 = this.failingLogin;
@@ -506,13 +506,13 @@ public void validateForm()
this.defaultAuthenticationFailureManager.recordAuthenticationFailure(login2, request);
this.defaultAuthenticationFailureManager.recordAuthenticationFailure(login2, request);
- when(this.strategy1.validateForm(login1, null)).thenReturn(true);
- when(this.strategy2.validateForm(login1, null)).thenReturn(true);
- assertTrue(this.defaultAuthenticationFailureManager.validateForm(login1, null));
+ when(this.strategy1.validateForm(login1, (HttpServletRequest) null)).thenReturn(true);
+ when(this.strategy2.validateForm(login1, (HttpServletRequest) null)).thenReturn(true);
+ assertTrue(this.defaultAuthenticationFailureManager.validateForm(login1, (HttpServletRequest) null));
- when(this.strategy1.validateForm(login2, null)).thenReturn(true);
- when(this.strategy2.validateForm(login2, null)).thenReturn(false);
- assertFalse(this.defaultAuthenticationFailureManager.validateForm(login2, null));
+ when(this.strategy1.validateForm(login2, (HttpServletRequest) null)).thenReturn(true);
+ when(this.strategy2.validateForm(login2, (HttpServletRequest) null)).thenReturn(false);
+ assertFalse(this.defaultAuthenticationFailureManager.validateForm(login2, (HttpServletRequest) null));
}
@Test
@@ -531,7 +531,7 @@ void validateFormFailingSession()
* Validate that getUser is working properly.
*/
@Test
- public void getUserNotFound() throws XWikiException
+ void getUserNotFound() throws XWikiException
{
when(context.getMainXWiki()).thenReturn("mainwiki");
when(context.getWikiId()).thenReturn("currentwiki");
@@ -553,7 +553,7 @@ public void getUserNotFound() throws XWikiException
* Validate that getUser is working properly.
*/
@Test
- public void getUserGlobalFound() throws XWikiException
+ void getUserGlobalFound() throws XWikiException
{
when(context.getMainXWiki()).thenReturn("mainwiki");
DocumentReference globalReference = new DocumentReference("mainwiki", "XWiki", "foo");
@@ -575,7 +575,7 @@ public void getUserGlobalFound() throws XWikiException
* Validate that getUser is working properly.
*/
@Test
- public void getUserLocalFound() throws XWikiException
+ void getUserLocalFound() throws XWikiException
{
when(context.getMainXWiki()).thenReturn("mainwiki");
when(context.getWikiId()).thenReturn("currentwiki");
@@ -597,7 +597,7 @@ public void getUserLocalFound() throws XWikiException
}
@Test
- public void strategiesAreRebuildInCaseOfReset()
+ void strategiesAreRebuildInCaseOfReset()
{
HttpServletRequest request = getRequest("reset");
when(configuration.getFailureStrategies()).thenReturn(new String[] { "strategy1" });
diff --git a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/test/java/org/xwiki/security/authentication/internal/DisableAccountFailureStrategyTest.java b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/test/java/org/xwiki/security/authentication/internal/DisableAccountFailureStrategyTest.java
index f5cabc1afc92..d033d8b7638f 100644
--- a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/test/java/org/xwiki/security/authentication/internal/DisableAccountFailureStrategyTest.java
+++ b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/test/java/org/xwiki/security/authentication/internal/DisableAccountFailureStrategyTest.java
@@ -19,6 +19,12 @@
*/
package org.xwiki.security.authentication.internal;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
import javax.inject.Provider;
import org.junit.jupiter.api.BeforeEach;
@@ -32,16 +38,9 @@
import org.xwiki.test.junit5.mockito.InjectMockComponents;
import org.xwiki.test.junit5.mockito.MockComponent;
-import com.xpn.xwiki.XWikiException;
import com.xpn.xwiki.doc.XWikiDocument;
import com.xpn.xwiki.objects.BaseObject;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
/**
* Unit tests for {@link DisableAccountFailureStrategy}.
*
@@ -49,7 +48,7 @@
* @since 11.8RC1
*/
@ComponentTest
-public class DisableAccountFailureStrategyTest
+class DisableAccountFailureStrategyTest
{
@InjectMockComponents(role = AuthenticationFailureStrategy.class)
private DisableAccountFailureStrategy disableStrategy;
@@ -61,7 +60,7 @@ public class DisableAccountFailureStrategyTest
private XWikiDocument updatedDocument;
@BeforeEach
- public void configure() throws XWikiException
+ public void configure()
{
DocumentReference documentReference = new DocumentReference("test", "Some", "Page");
@@ -81,7 +80,7 @@ public void configure() throws XWikiException
}
@Test
- public void resetAuthenticationFailureCounterWhenAccountIsActivated()
+ void resetAuthenticationFailureCounterWhenAccountIsActivated()
{
when(this.updatedDocument.getOriginalDocument().getXObject(DisableAccountFailureStrategy.USER_CLASS_REFERENCE)
.getIntValue("active")).thenReturn(0);
@@ -95,7 +94,7 @@ public void resetAuthenticationFailureCounterWhenAccountIsActivated()
}
@Test
- public void dontResetAuthenticationFailureCounterWhenAccountRemainsInactive()
+ void dontResetAuthenticationFailureCounterWhenAccountRemainsInactive()
{
when(this.updatedDocument.getOriginalDocument().getXObject(DisableAccountFailureStrategy.USER_CLASS_REFERENCE)
.getIntValue("active")).thenReturn(0);
@@ -109,7 +108,7 @@ public void dontResetAuthenticationFailureCounterWhenAccountRemainsInactive()
}
@Test
- public void dontResetAuthenticationFailureCounterWhenAccountRemainsActive()
+ void dontResetAuthenticationFailureCounterWhenAccountRemainsActive()
{
when(this.updatedDocument.getOriginalDocument().getXObject(DisableAccountFailureStrategy.USER_CLASS_REFERENCE)
.getIntValue("active")).thenReturn(1);
@@ -123,7 +122,7 @@ public void dontResetAuthenticationFailureCounterWhenAccountRemainsActive()
}
@Test
- public void dontResetAuthenticationFailureCounterWhenAccountIsDeactivated()
+ void dontResetAuthenticationFailureCounterWhenAccountIsDeactivated()
{
when(this.updatedDocument.getOriginalDocument().getXObject(DisableAccountFailureStrategy.USER_CLASS_REFERENCE)
.getIntValue("active")).thenReturn(1);
@@ -137,7 +136,7 @@ public void dontResetAuthenticationFailureCounterWhenAccountIsDeactivated()
}
@Test
- public void onDocumentUpdatedNoUserAccount()
+ void onDocumentUpdatedNoUserAccount()
{
when(this.updatedDocument.getXObject(DisableAccountFailureStrategy.USER_CLASS_REFERENCE)).thenReturn(null);
@@ -147,7 +146,7 @@ public void onDocumentUpdatedNoUserAccount()
}
@Test
- public void onDocumentUpdatedNoUserAccountStateChange()
+ void onDocumentUpdatedNoUserAccountStateChange()
{
disableStrategy.onEvent(new DocumentUpdatedEvent(), updatedDocument, null);
@@ -155,8 +154,8 @@ public void onDocumentUpdatedNoUserAccountStateChange()
}
@Test
- public void validateFormReturnsFalseWhenUserNotFound()
+ void validateFormReturnsFalseWhenUserNotFound()
{
- assertFalse(this.disableStrategy.validateForm("Foo", null));
+ assertFalse(this.disableStrategy.validateForm("Foo", (javax.servlet.http.HttpServletRequest) null));
}
}
diff --git a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-script/pom.xml b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-script/pom.xml
index 2e032bacadea..4b301589bb90 100644
--- a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-script/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-script/pom.xml
@@ -62,8 +62,8 @@
test
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
diff --git a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-requiredrights/xwiki-platform-security-requiredrights-default/pom.xml b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-requiredrights/xwiki-platform-security-requiredrights-default/pom.xml
index 6c60a6806f02..546c719dec72 100644
--- a/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-requiredrights/xwiki-platform-security-requiredrights-default/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-requiredrights/xwiki-platform-security-requiredrights-default/pom.xml
@@ -57,6 +57,8 @@
xwiki-platform-rendering-macro-script
${project.version}
+
+
org.xwiki.platform
xwiki-platform-test-oldcore
diff --git a/xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/pom.xml b/xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/pom.xml
index 1c9dca5f33c7..cfb10995cf18 100644
--- a/xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/pom.xml
@@ -41,8 +41,8 @@
aspectjrt
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
org.xwiki.platform
diff --git a/xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/pom.xml b/xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/pom.xml
index b532e9ffc9ad..83d1bdb417da 100644
--- a/xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/pom.xml
@@ -99,8 +99,8 @@
${commons.version}
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
org.xwiki.platform
diff --git a/xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/main/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManager.java b/xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/main/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManager.java
index 2279a858b089..3619ed1e139c 100644
--- a/xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/main/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManager.java
+++ b/xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/main/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManager.java
@@ -27,15 +27,15 @@
import javax.inject.Inject;
import javax.inject.Provider;
import javax.inject.Singleton;
-import javax.servlet.http.HttpSession;
-import javax.servlet.http.Part;
import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
import org.xwiki.attachment.validation.AttachmentValidationException;
import org.xwiki.attachment.validation.AttachmentValidator;
import org.xwiki.component.annotation.Component;
+import org.xwiki.container.Container;
+import org.xwiki.container.servlet.ServletSession;
import org.xwiki.internal.attachment.XWikiAttachmentAccessWrapper;
+import org.xwiki.jakartabridge.servlet.JakartaServletBridge;
import org.xwiki.model.reference.DocumentReference;
import org.xwiki.store.TemporaryAttachmentException;
import org.xwiki.store.TemporaryAttachmentSessionsManager;
@@ -44,6 +44,9 @@
import com.xpn.xwiki.doc.XWikiAttachment;
import com.xpn.xwiki.doc.XWikiDocument;
+import jakarta.servlet.http.HttpSession;
+import jakarta.servlet.http.Part;
+
/**
* Default implementation of {@link TemporaryAttachmentSessionsManager}.
*
@@ -63,12 +66,11 @@ public class DefaultTemporaryAttachmentSessionsManager implements TemporaryAttac
private Provider attachmentValidator;
@Inject
- private Logger logger;
+ private Provider container;
private HttpSession getSession()
{
- XWikiContext context = this.contextProvider.get();
- return context.getRequest().getSession();
+ return ((ServletSession) this.container.get().getSession()).getJakartaHttpSession();
}
private TemporaryAttachmentSession getOrCreateSession()
@@ -90,6 +92,14 @@ public XWikiAttachment uploadAttachment(DocumentReference documentReference, Par
return uploadAttachment(documentReference, part, null);
}
+ @Override
+ @Deprecated
+ public XWikiAttachment uploadAttachment(DocumentReference documentReference, javax.servlet.http.Part part,
+ String filename) throws TemporaryAttachmentException, AttachmentValidationException
+ {
+ return uploadAttachment(documentReference, JakartaServletBridge.toJakarta(part), filename);
+ }
+
@Override
public XWikiAttachment uploadAttachment(DocumentReference documentReference, Part part, String filename)
throws TemporaryAttachmentException, AttachmentValidationException
@@ -107,7 +117,7 @@ public XWikiAttachment uploadAttachment(DocumentReference documentReference, Par
xWikiAttachment.setFilename(actualFilename);
xWikiAttachment.setContent(part.getInputStream());
xWikiAttachment.setAuthorReference(context.getUserReference());
- // Initialize an empty document with the right document reference and locale. We don't set the actual
+ // Initialize an empty document with the right document reference and locale. We don't set the actual
// document since it's a temporary attachment, but it is still useful to have a minimal knowledge of the
// document it is stored for.
xWikiAttachment.setDoc(new XWikiDocument(documentReference, documentReference.getLocale()), false);
diff --git a/xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/test/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManagerTest.java b/xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/test/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManagerTest.java
index dbc7d1d46da8..2b1e5152d669 100644
--- a/xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/test/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManagerTest.java
+++ b/xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/test/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManagerTest.java
@@ -19,8 +19,23 @@
*/
package org.xwiki.store.filesystem.internal;
+import static com.xpn.xwiki.plugin.fileupload.FileUploadPlugin.UPLOAD_MAXSIZE_PARAMETER;
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoInteractions;
+import static org.mockito.Mockito.when;
+
import java.io.ByteArrayInputStream;
-import java.io.File;
import java.io.InputStream;
import java.util.Arrays;
import java.util.Collections;
@@ -28,7 +43,6 @@
import java.util.Optional;
import javax.inject.Provider;
-import javax.servlet.http.HttpSession;
import javax.servlet.http.Part;
import org.junit.jupiter.api.BeforeEach;
@@ -39,11 +53,13 @@
import org.mockito.Mock;
import org.xwiki.attachment.validation.AttachmentValidationException;
import org.xwiki.attachment.validation.AttachmentValidator;
-import org.xwiki.environment.Environment;
+import org.xwiki.container.Container;
+import org.xwiki.container.servlet.ServletSession;
import org.xwiki.model.reference.DocumentReference;
import org.xwiki.model.reference.SpaceReference;
import org.xwiki.store.TemporaryAttachmentException;
-import org.xwiki.test.junit5.XWikiTempDir;
+import org.xwiki.test.TestEnvironment;
+import org.xwiki.test.annotation.ComponentList;
import org.xwiki.test.junit5.mockito.ComponentTest;
import org.xwiki.test.junit5.mockito.InjectMockComponents;
import org.xwiki.test.junit5.mockito.MockComponent;
@@ -54,23 +70,8 @@
import com.xpn.xwiki.doc.XWikiAttachment;
import com.xpn.xwiki.doc.XWikiDocument;
import com.xpn.xwiki.web.Utils;
-import com.xpn.xwiki.web.XWikiRequest;
-import static com.xpn.xwiki.plugin.fileupload.FileUploadPlugin.UPLOAD_MAXSIZE_PARAMETER;
-import static java.nio.charset.StandardCharsets.UTF_8;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoInteractions;
-import static org.mockito.Mockito.when;
+import jakarta.servlet.http.HttpSession;
/**
* Tests for {@link DefaultTemporaryAttachmentSessionsManager}.
@@ -79,6 +80,7 @@
* @since 14.3RC1
*/
@ComponentTest
+@ComponentList(TestEnvironment.class)
class DefaultTemporaryAttachmentSessionsManagerTest
{
private static final String ATTRIBUTE_KEY = "xwikiTemporaryAttachments";
@@ -92,12 +94,12 @@ class DefaultTemporaryAttachmentSessionsManagerTest
@MockComponent
private Provider attachmentValidatorProvider;
+ @MockComponent
+ private Container container;
+
@Mock
private AttachmentValidator attachmentValidator;
- @XWikiTempDir
- private File tmpDir;
-
@Mock
private XWikiContext context;
@@ -109,14 +111,11 @@ void setup(MockitoComponentManager mockitoComponentManager) throws Exception
{
when(this.contextProvider.get()).thenReturn(this.context);
- XWikiRequest xWikiRequest = mock(XWikiRequest.class);
- when(xWikiRequest.getSession()).thenReturn(this.httpSession);
- when(this.context.getRequest()).thenReturn(xWikiRequest);
+ ServletSession session = mock(ServletSession.class);
+ when(session.getJakartaHttpSession()).thenReturn(this.httpSession);
+ when(this.container.getSession()).thenReturn(session);
Utils.setComponentManager(mockitoComponentManager);
- Environment environment = mockitoComponentManager.registerMockComponent(Environment.class);
- when(environment.getTemporaryDirectory()).thenReturn(this.tmpDir);
-
when(this.attachmentValidatorProvider.get()).thenReturn(this.attachmentValidator);
}
diff --git a/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-api/pom.xml b/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-api/pom.xml
index 4d36872825d0..b3968809f62f 100644
--- a/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-api/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-tag/xwiki-platform-tag-api/pom.xml
@@ -65,10 +65,5 @@
${commons.version}
test
-
- javax.servlet
- javax.servlet-api
- test
-
diff --git a/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-docker/pom.xml b/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-docker/pom.xml
index e63f99f4d730..93e6cb5581b6 100644
--- a/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-docker/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-docker/pom.xml
@@ -165,8 +165,8 @@
commons-httpclient
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
compile
diff --git a/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-integration/pom.xml b/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-integration/pom.xml
index 5b2ce822e5c0..3d71d348f415 100644
--- a/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-integration/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-integration/pom.xml
@@ -79,8 +79,8 @@
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
org.xwiki.platform
diff --git a/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-oldcore/pom.xml b/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-oldcore/pom.xml
index 06e98a4ffea1..b7eb2559d4d2 100644
--- a/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-oldcore/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-oldcore/pom.xml
@@ -49,15 +49,15 @@
test-jar
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
compile
-
+
- org.mortbay.jasper
- apache-el
+ org.glassfish.expressly
+ expressly
runtime
diff --git a/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-page/pom.xml b/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-page/pom.xml
index f1cb85aab56b..e589a5b30b99 100644
--- a/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-page/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-page/pom.xml
@@ -108,6 +108,10 @@
xwiki-platform-rendering-transformation-macro
${project.version}
+
+ jakarta.servlet
+ jakarta.servlet-api
+
org.jsoup
jsoup
diff --git a/xwiki-platform-core/xwiki-platform-url/xwiki-platform-url-container/pom.xml b/xwiki-platform-core/xwiki-platform-url/xwiki-platform-url-container/pom.xml
index 38264eb444ae..7b22b44c22e8 100644
--- a/xwiki-platform-core/xwiki-platform-url/xwiki-platform-url-container/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-url/xwiki-platform-url-container/pom.xml
@@ -75,8 +75,8 @@
commons-lang3
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
diff --git a/xwiki-platform-core/xwiki-platform-url/xwiki-platform-url-default/pom.xml b/xwiki-platform-core/xwiki-platform-url/xwiki-platform-url-default/pom.xml
index ddcb37674d70..8bb8ae370fe2 100644
--- a/xwiki-platform-core/xwiki-platform-url/xwiki-platform-url-default/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-url/xwiki-platform-url-default/pom.xml
@@ -54,8 +54,8 @@
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
diff --git a/xwiki-platform-core/xwiki-platform-url/xwiki-platform-url-schemes/xwiki-platform-url-scheme-standard/pom.xml b/xwiki-platform-core/xwiki-platform-url/xwiki-platform-url-schemes/xwiki-platform-url-scheme-standard/pom.xml
index 1885594a1a6e..053b8ba156cf 100644
--- a/xwiki-platform-core/xwiki-platform-url/xwiki-platform-url-schemes/xwiki-platform-url-scheme-standard/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-url/xwiki-platform-url-schemes/xwiki-platform-url-scheme-standard/pom.xml
@@ -65,8 +65,8 @@
${project.version}
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
diff --git a/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-default/pom.xml b/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-default/pom.xml
index f508e91b9385..819ffae7a844 100644
--- a/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-default/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-default/pom.xml
@@ -64,6 +64,7 @@
xwiki-platform-configuration-default
${project.version}
+
org.xwiki.platform
diff --git a/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-resource/pom.xml b/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-resource/pom.xml
index 7af9d66c2e98..00f544f2e09e 100644
--- a/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-resource/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-resource/pom.xml
@@ -59,8 +59,8 @@
test
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
test
diff --git a/xwiki-platform-core/xwiki-platform-velocity/xwiki-platform-velocity-webapp/pom.xml b/xwiki-platform-core/xwiki-platform-velocity/xwiki-platform-velocity-webapp/pom.xml
index 572600bbc7ef..e4f73abdef5d 100644
--- a/xwiki-platform-core/xwiki-platform-velocity/xwiki-platform-velocity-webapp/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-velocity/xwiki-platform-velocity-webapp/pom.xml
@@ -46,8 +46,8 @@
${project.version}
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
diff --git a/xwiki-platform-core/xwiki-platform-vfs/xwiki-platform-vfs-api/pom.xml b/xwiki-platform-core/xwiki-platform-vfs/xwiki-platform-vfs-api/pom.xml
index ace14cb17585..eb96e2e87fa8 100644
--- a/xwiki-platform-core/xwiki-platform-vfs/xwiki-platform-vfs-api/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-vfs/xwiki-platform-vfs-api/pom.xml
@@ -223,8 +223,8 @@
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
test
diff --git a/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/src/main/webapp/WEB-INF/jetty-web.xml b/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/src/main/webapp/WEB-INF/jetty-web.xml
index 489e4a8e6d2d..474918d675ad 100644
--- a/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/src/main/webapp/WEB-INF/jetty-web.xml
+++ b/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/src/main/webapp/WEB-INF/jetty-web.xml
@@ -1,5 +1,5 @@
-
+
-
+
- ConversionFilter
+ HTMLConversionFilter
org.xwiki.wysiwyg.filter.ConversionFilter
@@ -101,13 +101,13 @@
XWikiContextInitializationFilter
- com.xpn.xwiki.web.XWikiContextInitializationFilter
+ com.xpn.xwiki.web.XWikiContextInitializer
XWikiRESTContextInitializationFilter
- com.xpn.xwiki.web.XWikiContextInitializationFilter
+ com.xpn.xwiki.web.XWikiContextInitializer
mode
@@ -177,7 +177,7 @@
- ConversionFilter
+ HTMLConversionFilter
action
REQUEST
INCLUDE
@@ -226,7 +226,7 @@
- org.xwiki.container.servlet.XWikiServletContextListener
+ org.xwiki.container.servlet.XWikiServletContextInitializer
diff --git a/xwiki-platform-core/xwiki-platform-webjars/xwiki-platform-webjars-api/pom.xml b/xwiki-platform-core/xwiki-platform-webjars/xwiki-platform-webjars-api/pom.xml
index 16475e5e4373..d7ab4e6df06e 100644
--- a/xwiki-platform-core/xwiki-platform-webjars/xwiki-platform-webjars-api/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-webjars/xwiki-platform-webjars-api/pom.xml
@@ -99,8 +99,8 @@
${project.version}
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
diff --git a/xwiki-platform-core/xwiki-platform-webjars/xwiki-platform-webjars-api/src/test/java/org/xwiki/webjars/internal/WebJarsResourceReferenceHandlerTest.java b/xwiki-platform-core/xwiki-platform-webjars/xwiki-platform-webjars-api/src/test/java/org/xwiki/webjars/internal/WebJarsResourceReferenceHandlerTest.java
index 33ccf91b7342..711d6ab97ccc 100644
--- a/xwiki-platform-core/xwiki-platform-webjars/xwiki-platform-webjars-api/src/test/java/org/xwiki/webjars/internal/WebJarsResourceReferenceHandlerTest.java
+++ b/xwiki-platform-core/xwiki-platform-webjars/xwiki-platform-webjars-api/src/test/java/org/xwiki/webjars/internal/WebJarsResourceReferenceHandlerTest.java
@@ -19,6 +19,23 @@
*/
package org.xwiki.webjars.internal;
+import static ch.qos.logback.classic.Level.ERROR;
+import static java.util.Arrays.asList;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotSame;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyLong;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoInteractions;
+import static org.mockito.Mockito.when;
+import static org.xwiki.test.LogLevel.DEBUG;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
@@ -26,8 +43,6 @@
import java.util.Date;
import javax.inject.Named;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
import org.apache.commons.io.input.CharSequenceInputStream;
import org.apache.velocity.exception.VelocityException;
@@ -49,22 +64,8 @@
import org.xwiki.test.junit5.mockito.MockComponent;
import org.xwiki.webjars.internal.filter.WebJarsResourceFilter;
-import static ch.qos.logback.classic.Level.ERROR;
-import static java.util.Arrays.asList;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotSame;
-import static org.junit.jupiter.api.Assertions.assertSame;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyLong;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoInteractions;
-import static org.mockito.Mockito.when;
-import static org.xwiki.test.LogLevel.DEBUG;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* Unit tests for {@link WebJarsResourceReferenceHandler}.
@@ -114,11 +115,11 @@ void setUp() throws Exception
when(this.response.getOutputStream()).thenReturn(responseOutputStream);
HttpServletResponse httpResponse = mock(HttpServletResponse.class);
- when(this.response.getHttpServletResponse()).thenReturn(httpResponse);
+ when(this.response.getJakartaHttpServletResponse()).thenReturn(httpResponse);
when(this.container.getResponse()).thenReturn(this.response);
HttpServletRequest httpRequest = mock(HttpServletRequest.class);
- when(this.request.getHttpServletRequest()).thenReturn(httpRequest);
+ when(this.request.getJakartaHttpServletRequest()).thenReturn(httpRequest);
when(this.container.getRequest()).thenReturn(this.request);
when(this.classLoaderManager.getURLClassLoader("wiki:wiki", true)).thenReturn(this.classLoader);
@@ -133,8 +134,8 @@ void executeWhenResourceDoesntExist() throws Exception
this.handler.handle(reference, this.chain);
verify(this.classLoader).getResourceAsStream("META-INF/resources/webjars/angular/2.1.11/angular.js");
- verify(this.response.getHttpServletResponse())
- .sendError(404, "Resource not found [angular/2.1.11/angular.js].");
+ verify(this.response.getJakartaHttpServletResponse()).sendError(404,
+ "Resource not found [angular/2.1.11/angular.js].");
verify(this.chain).handleNext(reference);
}
@@ -145,8 +146,8 @@ void executeWhenResourceExists() throws Exception
new WebJarsResourceReference("wiki:wiki", asList("angular", "2.1.11", "angular.js"));
ByteArrayInputStream resourceStream = new ByteArrayInputStream("content".getBytes());
- when(this.classLoader.getResourceAsStream("META-INF/resources/webjars/angular/2.1.11/angular.js")).thenReturn(
- resourceStream);
+ when(this.classLoader.getResourceAsStream("META-INF/resources/webjars/angular/2.1.11/angular.js"))
+ .thenReturn(resourceStream);
long now = new Date().getTime();
this.handler.handle(reference, this.chain);
@@ -160,15 +161,15 @@ void executeWhenResourceExists() throws Exception
verify(this.response).setContentType("application/javascript");
// Verify that the static resource is cached permanently.
- verify(this.response.getHttpServletResponse()).setHeader("Cache-Control", "public");
+ verify(this.response.getJakartaHttpServletResponse()).setHeader("Cache-Control", "public");
ArgumentCaptor expireDate = ArgumentCaptor.forClass(Long.class);
- verify(this.response.getHttpServletResponse()).setDateHeader(eq("Expires"), expireDate.capture());
+ verify(this.response.getJakartaHttpServletResponse()).setDateHeader(eq("Expires"), expireDate.capture());
// The expiration date should be in one year from now.
assertTrue(expireDate.getValue() >= (now + 365 * 24 * 3600 * 1000L));
// Also verify that the "Last-Modified" header has been set in the response so that the browser will send
// an If-Modified-Since header for the next request and we can tell it to use its cache.
- verify(this.response.getHttpServletResponse()).setDateHeader(eq("Last-Modified"), anyLong());
+ verify(this.response.getJakartaHttpServletResponse()).setDateHeader(eq("Last-Modified"), anyLong());
verify(this.chain).handleNext(reference);
}
@@ -179,12 +180,12 @@ void return304WhenIfModifiedSinceHeader() throws Exception
WebJarsResourceReference reference =
new WebJarsResourceReference("wiki:wiki", asList("angular", "2.1.11", "angular.js"));
- when(this.request.getHttpServletRequest().getHeader("If-Modified-Since")).thenReturn("some value");
+ when(this.request.getJakartaHttpServletRequest().getHeader("If-Modified-Since")).thenReturn("some value");
this.handler.handle(reference, this.chain);
// This the test: we verify that 304 is returned when the "If-Modified-Since" header is found in the request
- verify(this.response.getHttpServletResponse()).setStatus(304);
+ verify(this.response.getJakartaHttpServletResponse()).setStatus(304);
verify(this.chain).handleNext(reference);
}
@@ -198,8 +199,7 @@ void evaluateResource() throws Exception
try (ByteArrayInputStream resourceStream = new ByteArrayInputStream("content".getBytes())) {
when(this.classLoader.getResourceAsStream("META-INF/resources/webjars/angular/2.1.11/angular.js"))
- .thenReturn(
- resourceStream);
+ .thenReturn(resourceStream);
}
when(this.velocityFilter.filter(any(), any()))
@@ -214,8 +214,8 @@ void evaluateResource() throws Exception
verify(this.response).setContentType("application/javascript");
// Verify that the dynamic resource is not cached.
- verify(this.response.getHttpServletResponse(), never()).setHeader(any(), any());
- verify(this.response.getHttpServletResponse(), never()).setDateHeader(any(), anyLong());
+ verify(this.response.getJakartaHttpServletResponse(), never()).setHeader(any(), any());
+ verify(this.response.getJakartaHttpServletResponse(), never()).setDateHeader(any(), anyLong());
}
@Test
@@ -243,7 +243,7 @@ void failingResourceEvaluation() throws Exception
this.logCapture.getMessage(0));
// Verify that the client is properly notified about the failure.
- verify(this.response.getHttpServletResponse()).sendError(500,
+ verify(this.response.getJakartaHttpServletResponse()).sendError(500,
"Failed to evaluate the Velocity code from WebJar resource [angular/2.1.11/angular.js]");
// The next handlers are still called.
@@ -284,9 +284,8 @@ void getContentType() throws Exception
WebJarsResourceReference resourceReference =
new WebJarsResourceReference("testNamespace", asList("testdirectory", "testfile.less"));
- String mimeType =
- this.handler.getContentType(new CharSequenceInputStream("a:\n color: #f00;", StandardCharsets.UTF_8),
- resourceReference);
+ String mimeType = this.handler.getContentType(
+ new CharSequenceInputStream("a:\n color: #f00;", StandardCharsets.UTF_8), resourceReference);
assertEquals("text/x-less", mimeType);
}
@@ -297,9 +296,8 @@ void getContentTypeLessAndEvaluate() throws Exception
new WebJarsResourceReference("testNamespace", asList("testdirectory", "testfile.less"));
resourceReference.addParameter("evaluate", "true");
- String mimeType =
- this.handler.getContentType(new CharSequenceInputStream("a:\n color: #f00;", StandardCharsets.UTF_8),
- resourceReference);
+ String mimeType = this.handler.getContentType(
+ new CharSequenceInputStream("a:\n color: #f00;", StandardCharsets.UTF_8), resourceReference);
assertEquals("text/css", mimeType);
}
diff --git a/xwiki-platform-core/xwiki-platform-websocket/pom.xml b/xwiki-platform-core/xwiki-platform-websocket/pom.xml
index 21bd64e9d265..91ffa8e5dfff 100644
--- a/xwiki-platform-core/xwiki-platform-websocket/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-websocket/pom.xml
@@ -48,12 +48,16 @@
${project.version}
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
- javax.websocket
- javax.websocket-api
+ jakarta.websocket
+ jakarta.websocket-api
+
+
+ jakarta.websocket
+ jakarta.websocket-client-api
diff --git a/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/AbstractXWikiEndpoint.java b/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/AbstractXWikiEndpoint.java
index af8cee9fc621..30db06d8117f 100644
--- a/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/AbstractXWikiEndpoint.java
+++ b/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/AbstractXWikiEndpoint.java
@@ -26,10 +26,10 @@
import java.util.List;
import javax.inject.Inject;
-import javax.websocket.CloseReason;
-import javax.websocket.EncodeException;
-import javax.websocket.Endpoint;
-import javax.websocket.Session;
+import jakarta.websocket.CloseReason;
+import jakarta.websocket.EncodeException;
+import jakarta.websocket.Endpoint;
+import jakarta.websocket.Session;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.slf4j.Logger;
diff --git a/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/DefaultWebSocketContext.java b/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/DefaultWebSocketContext.java
index 767e51efea53..c4f0ec29207c 100644
--- a/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/DefaultWebSocketContext.java
+++ b/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/DefaultWebSocketContext.java
@@ -25,10 +25,10 @@
import javax.inject.Inject;
import javax.inject.Singleton;
-import javax.websocket.HandshakeResponse;
-import javax.websocket.Session;
-import javax.websocket.server.HandshakeRequest;
-import javax.websocket.server.ServerEndpointConfig;
+import jakarta.websocket.HandshakeResponse;
+import jakarta.websocket.Session;
+import jakarta.websocket.server.HandshakeRequest;
+import jakarta.websocket.server.ServerEndpointConfig;
import org.slf4j.Logger;
import org.xwiki.component.annotation.Component;
diff --git a/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/DynamicEchoEndpoint.java b/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/DynamicEchoEndpoint.java
index 9db5a523f5a8..5ce9bafb44d3 100644
--- a/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/DynamicEchoEndpoint.java
+++ b/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/DynamicEchoEndpoint.java
@@ -22,10 +22,10 @@
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
-import javax.websocket.CloseReason;
-import javax.websocket.EndpointConfig;
-import javax.websocket.MessageHandler;
-import javax.websocket.Session;
+import jakarta.websocket.CloseReason;
+import jakarta.websocket.EndpointConfig;
+import jakarta.websocket.MessageHandler;
+import jakarta.websocket.Session;
import org.xwiki.bridge.DocumentAccessBridge;
import org.xwiki.component.annotation.Component;
diff --git a/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/StaticEchoEndpoint.java b/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/StaticEchoEndpoint.java
index d25f5e935a3e..240ebf4d4875 100644
--- a/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/StaticEchoEndpoint.java
+++ b/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/StaticEchoEndpoint.java
@@ -24,11 +24,11 @@
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
-import javax.websocket.CloseReason;
-import javax.websocket.OnMessage;
-import javax.websocket.OnOpen;
-import javax.websocket.Session;
-import javax.websocket.server.ServerEndpoint;
+import jakarta.websocket.CloseReason;
+import jakarta.websocket.OnMessage;
+import jakarta.websocket.OnOpen;
+import jakarta.websocket.Session;
+import jakarta.websocket.server.ServerEndpoint;
import org.slf4j.Logger;
import org.xwiki.bridge.DocumentAccessBridge;
diff --git a/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/XWikiWebSocketRequestStub.java b/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/XWikiWebSocketRequestStub.java
index aa6148f633ba..be90b3ced676 100644
--- a/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/XWikiWebSocketRequestStub.java
+++ b/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/XWikiWebSocketRequestStub.java
@@ -34,7 +34,7 @@
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpSession;
-import javax.websocket.server.HandshakeRequest;
+import jakarta.websocket.server.HandshakeRequest;
import com.xpn.xwiki.web.XWikiRequest;
import com.xpn.xwiki.web.XWikiServletRequestStub;
diff --git a/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/XWikiWebSocketResponseStub.java b/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/XWikiWebSocketResponseStub.java
index 1581c6e8ede8..24888aaa1f71 100644
--- a/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/XWikiWebSocketResponseStub.java
+++ b/xwiki-platform-core/xwiki-platform-websocket/src/main/java/org/xwiki/websocket/internal/XWikiWebSocketResponseStub.java
@@ -33,7 +33,7 @@
import java.util.stream.Collectors;
import javax.servlet.http.Cookie;
-import javax.websocket.HandshakeResponse;
+import jakarta.websocket.HandshakeResponse;
import org.apache.commons.lang3.StringUtils;
diff --git a/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/DefaultWebSocketContextTest.java b/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/DefaultWebSocketContextTest.java
index ecb65ddffa8f..6cf514548358 100644
--- a/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/DefaultWebSocketContextTest.java
+++ b/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/DefaultWebSocketContextTest.java
@@ -25,10 +25,10 @@
import java.util.Map;
import javax.servlet.http.HttpSession;
-import javax.websocket.HandshakeResponse;
-import javax.websocket.Session;
-import javax.websocket.server.HandshakeRequest;
-import javax.websocket.server.ServerEndpointConfig;
+import jakarta.websocket.HandshakeResponse;
+import jakarta.websocket.Session;
+import jakarta.websocket.server.HandshakeRequest;
+import jakarta.websocket.server.ServerEndpointConfig;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
diff --git a/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/DynamicEchoEndpointTest.java b/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/DynamicEchoEndpointTest.java
index e3b6a08bde71..df9831a14d3d 100644
--- a/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/DynamicEchoEndpointTest.java
+++ b/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/DynamicEchoEndpointTest.java
@@ -19,10 +19,10 @@
*/
package org.xwiki.websocket.internal;
-import javax.websocket.CloseReason;
-import javax.websocket.MessageHandler;
-import javax.websocket.RemoteEndpoint.Basic;
-import javax.websocket.Session;
+import jakarta.websocket.CloseReason;
+import jakarta.websocket.MessageHandler;
+import jakarta.websocket.RemoteEndpoint.Basic;
+import jakarta.websocket.Session;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
diff --git a/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/XWikiWebSocketRequestStubTest.java b/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/XWikiWebSocketRequestStubTest.java
index 2e3182d1f469..51ec3e81c240 100644
--- a/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/XWikiWebSocketRequestStubTest.java
+++ b/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/XWikiWebSocketRequestStubTest.java
@@ -28,7 +28,7 @@
import java.util.Map;
import javax.servlet.http.HttpSession;
-import javax.websocket.server.HandshakeRequest;
+import jakarta.websocket.server.HandshakeRequest;
import org.junit.jupiter.api.Test;
diff --git a/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/XWikiWebSocketResponseStubTest.java b/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/XWikiWebSocketResponseStubTest.java
index afee2e62b06e..d65903d81d9e 100644
--- a/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/XWikiWebSocketResponseStubTest.java
+++ b/xwiki-platform-core/xwiki-platform-websocket/src/test/java/org/xwiki/websocket/internal/XWikiWebSocketResponseStubTest.java
@@ -27,7 +27,7 @@
import java.util.Map;
import javax.servlet.http.Cookie;
-import javax.websocket.HandshakeResponse;
+import jakarta.websocket.HandshakeResponse;
import org.junit.jupiter.api.Test;
diff --git a/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-creationjob/pom.xml b/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-creationjob/pom.xml
index d8a76ac13ef3..51a29a60e7d9 100644
--- a/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-creationjob/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-creationjob/pom.xml
@@ -92,8 +92,8 @@
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
test
diff --git a/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-default/pom.xml b/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-default/pom.xml
index 207989660add..27508d8b4515 100644
--- a/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-default/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-default/pom.xml
@@ -76,8 +76,8 @@
${project.version}
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
diff --git a/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-script/pom.xml b/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-script/pom.xml
index df7ea4e9fe47..5f14c5339e14 100644
--- a/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-script/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-script/pom.xml
@@ -65,8 +65,8 @@
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
test
diff --git a/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-template/xwiki-platform-wiki-template-default/pom.xml b/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-template/xwiki-platform-wiki-template-default/pom.xml
index 1a2d06987f74..fccd1d6feab3 100644
--- a/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-template/xwiki-platform-wiki-template-default/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-template/xwiki-platform-wiki-template-default/pom.xml
@@ -53,8 +53,8 @@
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
test
diff --git a/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-template/xwiki-platform-wiki-template-script/pom.xml b/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-template/xwiki-platform-wiki-template-script/pom.xml
index 69209b3bad09..70bef2e5381d 100644
--- a/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-template/xwiki-platform-wiki-template-script/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-template/xwiki-platform-wiki-template-script/pom.xml
@@ -50,8 +50,8 @@
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
test
diff --git a/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-user/xwiki-platform-wiki-user-script/pom.xml b/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-user/xwiki-platform-wiki-user-script/pom.xml
index c8e2cc2e9c13..7ed1d60ffea9 100644
--- a/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-user/xwiki-platform-wiki-user-script/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-user/xwiki-platform-wiki-user-script/pom.xml
@@ -53,8 +53,8 @@
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
test
diff --git a/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-workspaces-migrator/pom.xml b/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-workspaces-migrator/pom.xml
index 7fa3dc91ff7c..abc4cdef2544 100644
--- a/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-workspaces-migrator/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-workspaces-migrator/pom.xml
@@ -53,8 +53,8 @@
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
test
diff --git a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/pom.xml b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/pom.xml
index 66811a6ca31e..fd6859a3559d 100644
--- a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/pom.xml
@@ -37,9 +37,9 @@
WYSIWYG Editor Module
-
- javax.servlet
- javax.servlet-api
+
+ jakarta.servlet
+ jakarta.servlet-api
diff --git a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/converter/JakartaRequestParameterConversionResult.java b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/converter/JakartaRequestParameterConversionResult.java
new file mode 100644
index 000000000000..319e8b02806c
--- /dev/null
+++ b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/converter/JakartaRequestParameterConversionResult.java
@@ -0,0 +1,78 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.xwiki.wysiwyg.converter;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.xwiki.wysiwyg.filter.MutableJakartaServletRequest;
+
+/**
+ * Simple POJO holding the result of a conversion performed with {@link RequestParameterConverter}. More specifically
+ * this class contains a mutable request, resulting of the conversion, a map of errors that might have occurred during
+ * the conversion for each parameter, and a map of the output of the conversion for each parameter.
+ *
+ * @version $Id$
+ * @since 42.0.0
+ */
+public class JakartaRequestParameterConversionResult
+{
+ private MutableJakartaServletRequest request;
+
+ private Map errors;
+
+ private Map output;
+
+ /**
+ * Default constructor.
+ *
+ * @param request a mutable copy of the original request used for the conversion
+ */
+ public JakartaRequestParameterConversionResult(MutableJakartaServletRequest request)
+ {
+ this.request = request;
+ this.errors = new LinkedHashMap<>();
+ this.output = new LinkedHashMap<>();
+ }
+
+ /**
+ * @return the mutable request
+ */
+ public MutableJakartaServletRequest getRequest()
+ {
+ return request;
+ }
+
+ /**
+ * @return the map of errors indexed by parameters
+ */
+ public Map getErrors()
+ {
+ return errors;
+ }
+
+ /**
+ * @return the map of conversion output indexed by parameters
+ */
+ public Map getOutput()
+ {
+ return output;
+ }
+}
diff --git a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/converter/RequestParameterConversionResult.java b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/converter/RequestParameterConversionResult.java
index f81bb6c53ebd..8672b6a31659 100644
--- a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/converter/RequestParameterConversionResult.java
+++ b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/converter/RequestParameterConversionResult.java
@@ -23,19 +23,24 @@
import java.util.Map;
import org.xwiki.wysiwyg.filter.MutableServletRequest;
+import org.xwiki.wysiwyg.internal.filter.http.JavaxToJakartaMutableHttpServletRequest;
/**
- * Simple POJO holding the result of a conversion performed with {@link RequestParameterConverter}.
- * More specifically this class contains a mutable request, resulting of the conversion, a map of errors that might have
- * occurred during the conversion for each parameter, and a map of the output of the conversion for each parameter.
+ * Simple POJO holding the result of a conversion performed with {@link RequestParameterConverter}. More specifically
+ * this class contains a mutable request, resulting of the conversion, a map of errors that might have occurred during
+ * the conversion for each parameter, and a map of the output of the conversion for each parameter.
*
* @version $Id$
* @since 14.10
+ * @deprecated use {@link JakartaRequestParameterConversionResult} instead
*/
+@Deprecated(since = "42.0.0")
public class RequestParameterConversionResult
{
private MutableServletRequest request;
+
private Map errors;
+
private Map output;
/**
@@ -50,6 +55,19 @@ public RequestParameterConversionResult(MutableServletRequest request)
this.output = new LinkedHashMap<>();
}
+ /**
+ * Default constructor.
+ *
+ * @param result the jakarta result to copy
+ * @since 42.0.0
+ */
+ public RequestParameterConversionResult(JakartaRequestParameterConversionResult result)
+ {
+ this.request = new JavaxToJakartaMutableHttpServletRequest(result.getRequest());
+ this.errors = result.getErrors();
+ this.output = result.getOutput();
+ }
+
/**
* @return the mutable request
*/
diff --git a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/converter/RequestParameterConverter.java b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/converter/RequestParameterConverter.java
index a7e9910a1ceb..eaa6433a53ba 100644
--- a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/converter/RequestParameterConverter.java
+++ b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/converter/RequestParameterConverter.java
@@ -22,10 +22,13 @@
import java.io.IOException;
import java.util.Optional;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
import org.xwiki.component.annotation.Role;
+import org.xwiki.jakartabridge.servlet.JakartaServletBridge;
+import org.xwiki.stability.Unstable;
+import org.xwiki.wysiwyg.internal.filter.http.JakartaToJavaxMutableHttpServletRequest;
+
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
/**
* Check if the given request contains parameters that needs conversion and perform the needing conversion.
@@ -37,30 +40,83 @@
public interface RequestParameterConverter
{
/**
- * Check if the given request needs conversion and perform those conversions.
- * This method creates a mutable request, modifies and returns it. However in case of
- * error it will return an empty optional, and it will handle directly the errors in the response.
- * See {@link #convert(ServletRequest)} for using an exception for handling the errors.
+ * Check if the given request needs conversion and perform those conversions. This method creates a mutable request,
+ * modifies and returns it. However in case of error it will return an empty optional, and it will handle directly
+ * the errors in the response. See {@link #convert(javax.servlet.ServletRequest)} for using an exception for
+ * handling the errors.
*
* @param request the request that might contain parameter needing conversion or an {@link Optional#empty()} in case
- * of error
+ * of error
* @param response the response used to redirect or do changes in case of conversion error
* @return a mutable request with the converted parameters, or an empty optional in case of error
* @throws IOException in case of problem to write an answer in the response
+ * @deprecated use {@link #convert(ServletRequest, ServletResponse)} instead
*/
- Optional convert(ServletRequest request, ServletResponse response) throws IOException;
+ @Deprecated(since = "42.0.0")
+ default Optional convert(javax.servlet.ServletRequest request,
+ javax.servlet.ServletResponse response) throws IOException
+ {
+ Optional result =
+ convert(JakartaServletBridge.toJakarta(request), JakartaServletBridge.toJakarta(response));
+
+ return result.isEmpty() ? Optional.empty() : Optional.of(JakartaServletBridge.toJavax(result.get()));
+ }
/**
- * Check if the given request needs conversion and perform those conversions.
- * This method creates a mutable request, modifies it and returns it along with the errors and output that have
- * occurred as part of the conversion, all that holds in the returned {@link RequestParameterConversionResult}.
- * Consumer of this API should always check if the obtained result contains errors or not to know if the conversion
- * properly succeeded.
+ * Check if the given request needs conversion and perform those conversions. This method creates a mutable request,
+ * modifies and returns it. However in case of error it will return an empty optional, and it will handle directly
+ * the errors in the response. See {@link #convert(javax.servlet.ServletRequest)} for using an exception for
+ * handling the errors.
+ *
+ * @param request the request that might contain parameter needing conversion or an {@link Optional#empty()} in case
+ * of error
+ * @param response the response used to redirect or do changes in case of conversion error
+ * @return a mutable request with the converted parameters, or an empty optional in case of error
+ * @throws IOException in case of problem to write an answer in the response
+ * @since 42.0.0
+ */
+ @Unstable
+ default Optional convert(ServletRequest request, ServletResponse response) throws IOException
+ {
+ Optional result =
+ convert(JakartaServletBridge.toJavax(request), JakartaServletBridge.toJavax(response));
+
+ return result.isEmpty() ? Optional.empty() : Optional.of(JakartaServletBridge.toJakarta(result.get()));
+ }
+
+ /**
+ * Check if the given request needs conversion and perform those conversions. This method creates a mutable request,
+ * modifies it and returns it along with the errors and output that have occurred as part of the conversion, all
+ * that holds in the returned {@link RequestParameterConversionResult}. Consumer of this API should always check if
+ * the obtained result contains errors or not to know if the conversion properly succeeded.
*
* @param request the request that might contain parameter needing conversion
* @return an instance of {@link RequestParameterConversionResult} containing the modified request and the output
* and errors that might have occurred
* @since 14.10
+ * @deprecated use {@link #convert(ServletRequest)} instead
+ */
+ @Deprecated(since = "42.0.0")
+ default RequestParameterConversionResult convert(javax.servlet.ServletRequest request)
+ {
+ return new RequestParameterConversionResult(convert(JakartaServletBridge.toJakarta(request)));
+ }
+
+ /**
+ * Check if the given request needs conversion and perform those conversions. This method creates a mutable request,
+ * modifies it and returns it along with the errors and output that have occurred as part of the conversion, all
+ * that holds in the returned {@link RequestParameterConversionResult}. Consumer of this API should always check if
+ * the obtained result contains errors or not to know if the conversion properly succeeded.
+ *
+ * @param request the request that might contain parameter needing conversion
+ * @return an instance of {@link RequestParameterConversionResult} containing the modified request and the output
+ * and errors that might have occurred
+ * @since 42.0.0
*/
- RequestParameterConversionResult convert(ServletRequest request);
+ @Unstable
+ default JakartaRequestParameterConversionResult convert(ServletRequest request)
+ {
+ return new JakartaRequestParameterConversionResult(
+ new JakartaToJavaxMutableHttpServletRequest(convert(JakartaServletBridge.toJavax(request)).getRequest()));
+ }
}
diff --git a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/ConversionFilter.java b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/ConversionFilter.java
index 995db15d284b..989fc954ac36 100644
--- a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/ConversionFilter.java
+++ b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/ConversionFilter.java
@@ -22,12 +22,12 @@
import java.io.IOException;
import java.util.Optional;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.FilterConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
import org.xwiki.context.Execution;
import org.xwiki.context.ExecutionContext;
@@ -38,8 +38,12 @@
/**
* This filter is used to convert the values of request parameters that require HTML conversion before being processed.
* A HTML editor can use this filter to convert its output to a specific syntax before it is saved.
+ *
+ * While the class is much older, the since annotation was moved to 42.0.0 because it implement a completely different
+ * API from Java point of view.
*
* @version $Id$
+ * @since 42.0.0
*/
public class ConversionFilter implements Filter
{
diff --git a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/MutableJakartaServletRequest.java b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/MutableJakartaServletRequest.java
new file mode 100644
index 000000000000..8136d84351a0
--- /dev/null
+++ b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/MutableJakartaServletRequest.java
@@ -0,0 +1,98 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.xwiki.wysiwyg.filter;
+
+import java.io.IOException;
+
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+
+/**
+ * A servlet request that can be modified. It is very useful, for instance, when you need to change the values of some
+ * request parameters, inside a filter.
+ *
+ * @version $Id$
+ * @since 42.0.0
+ */
+public interface MutableJakartaServletRequest extends ServletRequest
+{
+ /**
+ * Sets the value of a request parameter.
+ *
+ * @param name the name of the request parameter
+ * @param value the new value of the request parameter
+ * @return the old value of the specified request parameter, or {@code null} if this is the first time we set its
+ * value
+ */
+ String setParameter(String name, String value);
+
+ /**
+ * Sets the values of a request parameter.
+ *
+ * @param name the name of the request parameter
+ * @param values the new array of values for the specified request parameter
+ * @return the old values of the specified request parameter, or {@code null} if this is the first time we set its
+ * values
+ */
+ String[] setParameterValues(String name, String[] values);
+
+ /**
+ * Removes the request parameter with the specified name.
+ *
+ * @param name a string representing the name of the request parameter to be removed
+ * @return the old value of the specified request parameter, or {@code null} if it wasn't set
+ */
+ String removeParameter(String name);
+
+ /**
+ * Redirects this request to the specified URL. We had to add this method since there's no generic way to redirect a
+ * {@link ServletRequest}.
+ *
+ * @param response the response object used to redirect
+ * @param url the location where to redirect
+ * @throws IOException if the redirect fails
+ */
+ void sendRedirect(ServletResponse response, String url) throws IOException;
+
+ /**
+ * @return the URL of the requester
+ */
+ String getReferer();
+
+ /**
+ * @param attrName the name of the session attribute whose value should be retrieved
+ * @return the value of the specified session attribute
+ */
+ Object getSessionAttribute(String attrName);
+
+ /**
+ * Sets the value of a session attribute.
+ *
+ * @param attrName the name of the session attribute
+ * @param attrValue the value to be set
+ * @return the previous value of the specified session attribute
+ */
+ Object setSessionAttribute(String attrName, Object attrValue);
+
+ /**
+ * @return the request object wrapped by this object
+ */
+ ServletRequest getRequest();
+}
diff --git a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/MutableServletRequest.java b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/MutableServletRequest.java
index c3efb91d4899..8adb847f2b05 100644
--- a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/MutableServletRequest.java
+++ b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/MutableServletRequest.java
@@ -29,7 +29,9 @@
* request parameters, inside a filter.
*
* @version $Id$
+ * @deprecated use {@link MutableJakartaServletRequest} instead
*/
+@Deprecated(since = "42.0.0")
public interface MutableServletRequest extends ServletRequest
{
/**
diff --git a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/MutableServletRequestFactory.java b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/MutableServletRequestFactory.java
index e1db8ec5280d..625e20053249 100644
--- a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/MutableServletRequestFactory.java
+++ b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/filter/MutableServletRequestFactory.java
@@ -19,9 +19,13 @@
*/
package org.xwiki.wysiwyg.filter;
-import javax.servlet.ServletRequest;
-
import org.xwiki.component.annotation.Role;
+import org.xwiki.jakartabridge.servlet.JakartaServletBridge;
+import org.xwiki.stability.Unstable;
+import org.xwiki.wysiwyg.internal.filter.http.JakartaToJavaxMutableHttpServletRequest;
+import org.xwiki.wysiwyg.internal.filter.http.JavaxToJakartaMutableHttpServletRequest;
+
+import jakarta.servlet.ServletRequest;
/**
* A factory for mutable servlet requests. This factory is needed because concrete mutable servlet requests don't have a
@@ -38,6 +42,24 @@ public interface MutableServletRequestFactory
*
* @param request The original servlet request to wrap.
* @return a new mutable servlet request.
+ * @deprecated use {@link #newInstance(ServletRequest)} instead
+ */
+ @Deprecated(since = "42.0.0")
+ default MutableServletRequest newInstance(javax.servlet.ServletRequest request)
+ {
+ return new JavaxToJakartaMutableHttpServletRequest(newInstance(JakartaServletBridge.toJakarta(request)));
+ }
+
+ /**
+ * Creates a new mutable servlet request.
+ *
+ * @param request The original servlet request to wrap.
+ * @return a new mutable servlet request.
+ * @since 42.0.0
*/
- MutableServletRequest newInstance(ServletRequest request);
+ @Unstable
+ default MutableJakartaServletRequest newInstance(ServletRequest request)
+ {
+ return new JakartaToJavaxMutableHttpServletRequest(newInstance(JakartaServletBridge.toJavax(request)));
+ }
}
diff --git a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/converter/DefaultRequestParameterConverter.java b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/converter/DefaultRequestParameterConverter.java
index 35e868942b42..bd7c29e7cded 100644
--- a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/converter/DefaultRequestParameterConverter.java
+++ b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/converter/DefaultRequestParameterConverter.java
@@ -26,21 +26,22 @@
import javax.inject.Inject;
import javax.inject.Singleton;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.xwiki.component.annotation.Component;
import org.xwiki.wysiwyg.converter.HTMLConverter;
-import org.xwiki.wysiwyg.converter.RequestParameterConversionResult;
+import org.xwiki.wysiwyg.converter.JakartaRequestParameterConversionResult;
import org.xwiki.wysiwyg.converter.RequestParameterConverter;
-import org.xwiki.wysiwyg.filter.MutableServletRequest;
+import org.xwiki.wysiwyg.filter.MutableJakartaServletRequest;
import org.xwiki.wysiwyg.filter.MutableServletRequestFactory;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* Default implementation of {@link RequestParameterConverter} that handles HTML conversion of parameters needing such
* conversion.
@@ -87,22 +88,25 @@ public class DefaultRequestParameterConverter implements RequestParameterConvert
@Override
public Optional convert(ServletRequest request, ServletResponse response) throws IOException
{
- RequestParameterConversionResult conversionResult = this.convert(request);
+ JakartaRequestParameterConversionResult conversionResult = convert(request);
Optional result;
if (conversionResult.getErrors().isEmpty()) {
result = Optional.of(conversionResult.getRequest());
} else {
result = Optional.empty();
- this.handleConversionErrors(conversionResult, response);
+ handleConversionErrors(conversionResult, response);
}
+
return result;
}
@Override
- public RequestParameterConversionResult convert(ServletRequest request)
+ public JakartaRequestParameterConversionResult convert(ServletRequest request)
{
- MutableServletRequest mutableServletRequest = this.mutableServletRequestFactory.newInstance(request);
- RequestParameterConversionResult result = new RequestParameterConversionResult(mutableServletRequest);
+ MutableJakartaServletRequest mutableServletRequest = this.mutableServletRequestFactory.newInstance(request);
+ JakartaRequestParameterConversionResult result =
+ new JakartaRequestParameterConversionResult(mutableServletRequest);
+
// Take the list of request parameters that require HTML conversion.
String[] parametersRequiringHTMLConversion = request.getParameterValues(REQUIRES_HTML_CONVERSION);
if (parametersRequiringHTMLConversion != null) {
@@ -110,13 +114,14 @@ public RequestParameterConversionResult convert(ServletRequest request)
result.getRequest().removeParameter(REQUIRES_HTML_CONVERSION);
convertHTML(parametersRequiringHTMLConversion, result);
}
+
return result;
}
private void convertHTML(String[] parametersRequiringHTMLConversion,
- RequestParameterConversionResult conversionResult)
+ JakartaRequestParameterConversionResult conversionResult)
{
- MutableServletRequest request = conversionResult.getRequest();
+ MutableJakartaServletRequest request = conversionResult.getRequest();
for (String parameterName : parametersRequiringHTMLConversion) {
String html = request.getParameter(parameterName);
// Remove the syntax parameter from the request to avoid interference with further request processing.
@@ -135,13 +140,13 @@ private void convertHTML(String[] parametersRequiringHTMLConversion,
}
}
- private void handleConversionErrors(RequestParameterConversionResult conversionResult, ServletResponse res)
+ private void handleConversionErrors(JakartaRequestParameterConversionResult conversionResult, ServletResponse res)
throws IOException
{
- MutableServletRequest mutableRequest = conversionResult.getRequest();
+ MutableJakartaServletRequest mutableRequest = conversionResult.getRequest();
ServletRequest originalRequest = mutableRequest.getRequest();
- if (originalRequest instanceof HttpServletRequest
- && "XMLHttpRequest".equals(((HttpServletRequest) originalRequest).getHeader("X-Requested-With"))) {
+ if (originalRequest instanceof HttpServletRequest httpRequest
+ && "XMLHttpRequest".equals(httpRequest.getHeader("X-Requested-With"))) {
// If this is an AJAX request then we should simply send back the error.
StringBuilder errorMessage = new StringBuilder();
// Aggregate all error messages (for all fields that have conversion errors).
@@ -184,11 +189,11 @@ private void handleConversionErrors(RequestParameterConversionResult conversionR
* {@value #CONVERSION_ERRORS} session attributes
*/
@SuppressWarnings("unchecked")
- private String save(RequestParameterConversionResult conversionResult)
+ private String save(JakartaRequestParameterConversionResult conversionResult)
{
// Generate a random key to identify the request.
String key = RandomStringUtils.secure().nextAlphanumeric(4);
- MutableServletRequest request = conversionResult.getRequest();
+ MutableJakartaServletRequest request = conversionResult.getRequest();
// Save the output on the session.
Map> conversionOutput =
diff --git a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/JakartaToJavaxMutableHttpServletRequest.java b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/JakartaToJavaxMutableHttpServletRequest.java
new file mode 100644
index 000000000000..8bfd894cdcc6
--- /dev/null
+++ b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/JakartaToJavaxMutableHttpServletRequest.java
@@ -0,0 +1,93 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.xwiki.wysiwyg.internal.filter.http;
+
+import java.io.IOException;
+
+import org.xwiki.jakartabridge.servlet.JakartaServletBridge;
+import org.xwiki.jakartabridge.servlet.internal.JakartaToJavaxServletRequest;
+import org.xwiki.wysiwyg.filter.MutableJakartaServletRequest;
+import org.xwiki.wysiwyg.filter.MutableServletRequest;
+
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+
+/**
+ * @version $Id$
+ */
+public class JakartaToJavaxMutableHttpServletRequest extends JakartaToJavaxServletRequest
+ implements MutableJakartaServletRequest
+{
+ /**
+ * @param wrapped
+ */
+ public JakartaToJavaxMutableHttpServletRequest(MutableServletRequest wrapped)
+ {
+ super(wrapped);
+ }
+
+ @Override
+ public String setParameter(String name, String value)
+ {
+ return this.wrapped.setParameter(name, value);
+ }
+
+ @Override
+ public String[] setParameterValues(String name, String[] values)
+ {
+ return this.wrapped.setParameterValues(name, values);
+ }
+
+ @Override
+ public String removeParameter(String name)
+ {
+ return this.wrapped.removeParameter(name);
+ }
+
+ @Override
+ public void sendRedirect(ServletResponse response, String url) throws IOException
+ {
+ this.wrapped.sendRedirect(JakartaServletBridge.toJavax(response), url);
+ }
+
+ @Override
+ public String getReferer()
+ {
+ return this.wrapped.getReferer();
+ }
+
+ @Override
+ public Object getSessionAttribute(String attrName)
+ {
+ return this.wrapped.getSessionAttribute(attrName);
+ }
+
+ @Override
+ public Object setSessionAttribute(String attrName, Object attrValue)
+ {
+ return this.wrapped.setSessionAttribute(attrName, attrValue);
+ }
+
+ @Override
+ public ServletRequest getRequest()
+ {
+ return JakartaServletBridge.toJakarta(this.wrapped.getRequest());
+ }
+}
diff --git a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/JavaxToJakartaMutableHttpServletRequest.java b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/JavaxToJakartaMutableHttpServletRequest.java
new file mode 100644
index 000000000000..5f31ca009817
--- /dev/null
+++ b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/JavaxToJakartaMutableHttpServletRequest.java
@@ -0,0 +1,93 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.xwiki.wysiwyg.internal.filter.http;
+
+import java.io.IOException;
+
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+import org.xwiki.jakartabridge.servlet.JakartaServletBridge;
+import org.xwiki.jakartabridge.servlet.internal.JavaxToJakartaServletRequest;
+import org.xwiki.wysiwyg.filter.MutableJakartaServletRequest;
+import org.xwiki.wysiwyg.filter.MutableServletRequest;
+
+/**
+ * @version $Id$
+ */
+public class JavaxToJakartaMutableHttpServletRequest extends JavaxToJakartaServletRequest
+ implements MutableServletRequest
+{
+ /**
+ * @param wrapped
+ */
+ public JavaxToJakartaMutableHttpServletRequest(MutableJakartaServletRequest wrapped)
+ {
+ super(wrapped);
+ }
+
+ @Override
+ public String setParameter(String name, String value)
+ {
+ return this.wrapped.setParameter(name, value);
+ }
+
+ @Override
+ public String[] setParameterValues(String name, String[] values)
+ {
+ return this.wrapped.setParameterValues(name, values);
+ }
+
+ @Override
+ public String removeParameter(String name)
+ {
+ return this.wrapped.removeParameter(name);
+ }
+
+ @Override
+ public void sendRedirect(ServletResponse response, String url) throws IOException
+ {
+ this.wrapped.sendRedirect(JakartaServletBridge.toJakarta(response), url);
+ }
+
+ @Override
+ public String getReferer()
+ {
+ return this.wrapped.getReferer();
+ }
+
+ @Override
+ public Object getSessionAttribute(String attrName)
+ {
+ return this.wrapped.getSessionAttribute(attrName);
+ }
+
+ @Override
+ public Object setSessionAttribute(String attrName, Object attrValue)
+ {
+ return this.wrapped.setSessionAttribute(attrName, attrValue);
+ }
+
+ @Override
+ public ServletRequest getRequest()
+ {
+ return JakartaServletBridge.toJavax(this.wrapped.getRequest());
+ }
+}
diff --git a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/MutableHttpServletRequestFactory.java b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/MutableHttpServletRequestFactory.java
index 8e5338691ccd..a15eedecf938 100644
--- a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/MutableHttpServletRequestFactory.java
+++ b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/MutableHttpServletRequestFactory.java
@@ -19,14 +19,13 @@
*/
package org.xwiki.wysiwyg.internal.filter.http;
-import javax.inject.Singleton;
-import javax.servlet.ServletRequest;
-import javax.servlet.http.HttpServletRequest;
-
import org.xwiki.component.annotation.Component;
-import org.xwiki.wysiwyg.filter.MutableServletRequest;
+import org.xwiki.wysiwyg.filter.MutableJakartaServletRequest;
import org.xwiki.wysiwyg.filter.MutableServletRequestFactory;
+import jakarta.inject.Singleton;
+import jakarta.servlet.http.HttpServletRequest;
+
/**
* {@link MutableServletRequestFactory} implementation for the HTTP protocol.
*
@@ -37,10 +36,10 @@
public class MutableHttpServletRequestFactory implements MutableServletRequestFactory
{
@Override
- public synchronized MutableServletRequest newInstance(ServletRequest request)
+ public synchronized MutableJakartaServletRequest newInstance(jakarta.servlet.ServletRequest request)
{
- if (request instanceof HttpServletRequest) {
- return new MutableHttpServletRequest((HttpServletRequest) request);
+ if (request instanceof HttpServletRequest httpRequest) {
+ return new MutableJakartaHttpServletRequest(httpRequest);
} else {
throw new IllegalArgumentException(String.format("Expecting HttpServletRequest, got [%s]!", request));
}
diff --git a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/MutableHttpServletRequest.java b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/MutableJakartaHttpServletRequest.java
similarity index 87%
rename from xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/MutableHttpServletRequest.java
rename to xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/MutableJakartaHttpServletRequest.java
index a67bea9dae75..9ead0430ad0a 100644
--- a/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/MutableHttpServletRequest.java
+++ b/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-api/src/main/java/org/xwiki/wysiwyg/internal/filter/http/MutableJakartaHttpServletRequest.java
@@ -25,33 +25,33 @@
import java.util.HashMap;
import java.util.Map;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
-import javax.servlet.http.HttpServletResponse;
-
+import org.xwiki.wysiwyg.filter.MutableJakartaServletRequest;
import org.xwiki.wysiwyg.filter.MutableServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequestWrapper;
+import jakarta.servlet.http.HttpServletResponse;
+
/**
* {@link MutableServletRequest} implementation for the HTTP protocol.
*
* @version $Id$
*/
-public class MutableHttpServletRequest extends HttpServletRequestWrapper implements MutableServletRequest
+public class MutableJakartaHttpServletRequest extends HttpServletRequestWrapper implements MutableJakartaServletRequest
{
/**
* Parameters used instead of those from the wrapped request. This way exiting request parameters can be overwritten
* and also new parameters can be added.
*/
- private final Map params = new HashMap();
+ private final Map params = new HashMap<>();
/**
* Wraps the specified request and copies its parameters to {@link #params} where they can be overwritten later.
*
* @param request The request to be wrapped.
*/
- @SuppressWarnings("unchecked")
- public MutableHttpServletRequest(HttpServletRequest request)
+ public MutableJakartaHttpServletRequest(HttpServletRequest request)
{
super(request);
diff --git a/xwiki-platform-core/xwiki-platform-zipexplorer/pom.xml b/xwiki-platform-core/xwiki-platform-zipexplorer/pom.xml
index b582e0851d6c..322330809246 100644
--- a/xwiki-platform-core/xwiki-platform-zipexplorer/pom.xml
+++ b/xwiki-platform-core/xwiki-platform-zipexplorer/pom.xml
@@ -40,9 +40,10 @@
${project.version}
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
+
org.xwiki.platform
@@ -51,11 +52,6 @@
pom
test
-
diff --git a/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-data/pom.xml b/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-data/pom.xml
index 4aa0af65ce3a..723ea9071ec4 100644
--- a/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-data/pom.xml
+++ b/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-data/pom.xml
@@ -209,18 +209,6 @@
xwiki-platform-notifications-preferences-default
${project.version}
-
-
- javax.servlet
- javax.servlet-api
- ${servlet.version}
-
-
- org.mortbay.jasper
- apache-el
- ${apachache-el.version}
-
org.xwiki.platform
diff --git a/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-test/xwiki-platform-distribution-flavor-test-security/pom.xml b/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-test/xwiki-platform-distribution-flavor-test-security/pom.xml
index 72381caa10ac..4c0624c9bee0 100644
--- a/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-test/xwiki-platform-distribution-flavor-test-security/pom.xml
+++ b/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-test/xwiki-platform-distribution-flavor-test-security/pom.xml
@@ -62,8 +62,8 @@
test
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
test
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/README.md b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/README.md
index 49c732b8b242..179497b65a8f 100644
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/README.md
+++ b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/README.md
@@ -3,38 +3,14 @@ XWiki Jetty Configuration
These instructions are useful when upgrading the Jetty version used.
-We brought the following changes from the default Jetty files obtained from the Jetty zip file (in `jetty-home`):
+We brought the following changes from the default Jetty files obtained from the `org.eclipse.jetty:jetty-home` package:
-1. Addition of XWiki license headers to all files
1. Addition of `modules/xwiki.mod`, to group all modules we depend on.
1. Addition of `start.d/xwiki.ini` to configure the following properties:
- 1. Disable WAR scanning/hot deployment (since we use static deployment, and it speeds up
- Jetty) by changing the default values for:
- ```
- jetty.deploy.scanInterval=0
- jetty.deploy.extractWars=false
- ```
+ 1. Disable WAR scanning/hot deployment (since we use static deployment, and it speeds up Jetty).
1. Configure Jetty to use RFC3986 for URLs + allow for ambiguous elements in the URLs as XWiki currently needs
them (see the doc in start.d/xwiki.ini).
- ```
- jetty.httpConfig.uriCompliance=RFC3986,AMBIGUOUS_PATH_ENCODING,AMBIGUOUS_EMPTY_SEGMENT,AMBIGUOUS_PATH_SEPARATOR
- ```
1. Addition of `etc/jetty-xwiki.xml` to print a message in the console when XWiki is started.
-1. Remove support for JSP (since XWiki doesn't use JSPs) by:
- 1. Removing the following from `etc/webdefault-ee8.xml`:
- ```
-
- ...
-
- ```
- Also remove the `` just below it.
- Under `` alors remove the `index.jsp` line.
- 1. Keep only the `apache-el-` lib in `modules/ee8-apache-jsp.mod` (i.e. remove the JSP lib references).
- We need the EL lib for Hibernate Validator (see XWIKI-19314)
-1. Remove alpn (we don't need TLS/SSL for a demo packaging) and http2 support by:
- 1. Remove `lib/jetty-alpn-client-${jetty.version}.jar` from `modules/client.mod`
- 1. Remove references to the `alpn` and `http2` modules from `modules/https.mod`
-1. Addition of `modules/xwiki-logging.mod` to configure logging for XWiki (provides the Jetty `logging` module name)
1. Modification of `etc/console-capture.xml` to send logs to both the console and files. Namely, we wrap:
```
@@ -54,6 +30,6 @@ We brought the following changes from the default Jetty files obtained from the
- ```
-1. Note that we don't include all `etc/*.xml` files nor all `modules/*.mod` files since we don't use these extra
- features.
+ ```
+ This also means adding commons-io to Jetty.
+1. In the pom.xml, we exclude various files we know we don't need in this context, to reduce the size of the resulting zip file
\ No newline at end of file
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/pom.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/pom.xml
index c069c2d43f53..76fa1de9ea27 100644
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/pom.xml
+++ b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/pom.xml
@@ -32,114 +32,92 @@
pom
Packages a Jetty installation
-
- true
-
${jetty.server.version}
- ${jetty.server.slf4j.version}
+
+
+ org.eclipse.jetty
+ jetty-home
+ ${jetty.server.version}
+ zip
+
+
+
+ *
+ *
+
+
+
org.xwiki.platform
xwiki-platform-tool-jetty-listener
${project.version}
true
-
commons-io
commons-io
true
-
- org.eclipse.jetty
- jetty-server
- ${jetty.version}
- true
-
-
- org.eclipse.jetty
- jetty-xml
- ${jetty.version}
- true
-
-
- org.eclipse.jetty
- jetty-deploy
- ${jetty.version}
- true
-
-
- org.eclipse.jetty
- jetty-start
- ${jetty.version}
- shaded
- true
-
-
- org.eclipse.jetty
- jetty-jmx
- ${jetty.version}
- true
-
-
- org.eclipse.jetty.ee8
- jetty-ee8-annotations
- ${jetty.version}
- true
-
-
- org.eclipse.jetty
- jetty-plus
- ${jetty.version}
- true
-
-
- org.eclipse.jetty
- jetty-jndi
- ${jetty.version}
- true
-
-
- org.eclipse.jetty
- jetty-slf4j-impl
- ${jetty.version}
- true
-
-
- org.eclipse.jetty
- jetty-client
- ${jetty.version}
- true
-
-
-
- org.eclipse.jetty.ee8.websocket
- jetty-ee8-websocket-javax-server
- ${jetty.version}
- true
-
-
- org.eclipse.jetty.ee8.websocket
- jetty-ee8-websocket-javax-client
- ${jetty.version}
- true
-
-
-
- org.mortbay.jasper
- apache-el
- true
- compile
-
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ unpack
+ prepare-package
+
+ unpack
+
+
+
+
+ org.eclipse.jetty
+ jetty-home
+ ${jetty.server.version}
+ zip
+
+
+ **/*demo*,
+ **/*demo*/,
+
+ **/*ee8*,
+ **/*ee8*/,
+ **/*ee9*,
+ **/*ee9*/,
+
+ **/*http2*,
+ **/*http2*/,
+
+ **/*http3*,
+ **/*http3*/,
+
+ **/*cdi*,
+ **/*cdi*/,
+
+ **/*jstl*,
+ **/*jstl*/
+
+
+
+ ${project.build.directory}
+
+
+
+
+
+
org.apache.maven.plugins
maven-assembly-plugin
@@ -149,7 +127,7 @@
false
- ${basedir}/src/main/assembly/distribution.xml
+ src/main/assembly/distribution.xml
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/assembly/distribution.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/assembly/distribution.xml
index e2536127335e..42a98277a980 100644
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/assembly/distribution.xml
+++ b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/assembly/distribution.xml
@@ -26,89 +26,24 @@
zip
false
-
-
-
- start.jar
- /jetty
-
- org.eclipse.jetty:jetty-start:jar:shaded
-
-
- false
-
-
- /jetty/lib
+
+
+
+
+ ${basedir}/src/main/resources
+ /
- org.eclipse.jetty:jetty-start:jar:shaded
-
- org.xwiki.platform:xwiki-platform-tool-jetty-listener
- commons-io:commons-io
-
- org.ow2.asm:*
- jakarta.annotation:jakarta.annotation-api
-
- org.slf4j:slf4j-api
- org.eclipse.jetty:jetty-slf4j-impl
-
- org.eclipse.jetty.ee8.websocket:*
- *:jetty-javax-websocket-api
-
- org.mortbay.jasper:apache-el
+ **/*.sh
-
- false
-
-
- /jetty/lib/ext
-
- org.xwiki.platform:xwiki-platform-tool-jetty-listener
- commons-io:commons-io
-
-
- false
-
-
- /jetty/lib/ee8-annotations
-
- org.ow2.asm:*
- jakarta.annotation:jakarta.annotation-api
-
-
- false
-
-
- /jetty/lib/ee8-websocket
-
- org.eclipse.jetty.ee8.websocket:*
- *:jetty-javax-websocket-api
-
-
- false
-
-
-
- /jetty/lib/logging
-
- org.slf4j:slf4j-api
- org.eclipse.jetty:jetty-slf4j-impl
-
-
- false
-
-
-
-
- /jetty/lib/ee8-apache-jsp
-
- org.mortbay.jasper:apache-el
-
-
- false
-
-
-
+
+
+
+
+ ${project.build.directory}/jetty-home-${jetty.server.version}
+ /jetty/
+ 644
+
+
${basedir}/src/main/resources
@@ -118,18 +53,25 @@
755
-
-
- ${basedir}/src/main/resources
- /
-
- **/*.sh
-
-
+
${basedir}/src/main/resources/logs
/logs
+
+
+
+ /jetty/lib/ext
+
+
+ org.xwiki.platform:xwiki-platform-tool-jetty-listener
+
+ commons-io:commons-io
+
+
+ false
+
+
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-bytebufferpool.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-bytebufferpool.xml
deleted file mode 100644
index dbde985be754..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-bytebufferpool.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-deploy.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-deploy.xml
deleted file mode 100644
index 4a9d32146b28..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-deploy.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ee-webapp.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ee-webapp.xml
deleted file mode 100644
index 3b94f5cffb91..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ee-webapp.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ee8-deploy.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ee8-deploy.xml
deleted file mode 100644
index 1b3f910a1548..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ee8-deploy.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- org.eclipse.jetty.deploy.DeploymentManager
-
- [
-
- contextHandlerClass
-
-
- ]
- [
-
-
-
- ee8
-
-
-
-
-
-
-
-
-
-
-
-
- jetty.deploy.defaultsDescriptorPath
- jetty.deploy.defaultsDescriptor
-
- /etc/webdefault-ee8.xml
-
-
-
-
-
-
-
-
-
-
- .*/jetty-servlet-api-[^/]*\.jar$|.*jakarta.servlet.jsp.jstl-[^/]*\.jar|.*jsp.jstl-[^/]*\.jar
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ]
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ee8-webapp.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ee8-webapp.xml
deleted file mode 100644
index 0bd5e05b400d..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ee8-webapp.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-http-forwarded.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-http-forwarded.xml
deleted file mode 100644
index cbb0632d1294..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-http-forwarded.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-http.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-http.xml
deleted file mode 100644
index 1cc65d7ef341..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-http.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-https.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-https.xml
deleted file mode 100644
index 13f9cd9698d9..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-https.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- http/1.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-jmx.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-jmx.xml
deleted file mode 100644
index 290b15494332..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-jmx.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-requestlog.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-requestlog.xml
deleted file mode 100644
index d3417016fb34..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-requestlog.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /yyyy_mm_dd.request.log
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ssl-context.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ssl-context.xml
deleted file mode 100644
index 23e527475faf..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ssl-context.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ssl.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ssl.xml
deleted file mode 100644
index ffc314cc87b8..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-ssl.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-threadpool.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-threadpool.xml
deleted file mode 100644
index b79642525278..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-threadpool.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty.xml
deleted file mode 100644
index c8cfd3c9c498..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/sessions/id-manager.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/sessions/id-manager.xml
deleted file mode 100644
index a4841e55da73..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/sessions/id-manager.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- node
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/webdefault-ee8.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/webdefault-ee8.xml
deleted file mode 100644
index 214b9f6a3805..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/webdefault-ee8.xml
+++ /dev/null
@@ -1,414 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Default web.xml file.
- This file is applied to a Web application before its own WEB_INF/web.xml file
-
-
-
-
-
-
-
- org.eclipse.jetty.ee8.servlet.listener.IntrospectorCleaner
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- default
- org.eclipse.jetty.ee8.servlet.DefaultServlet
-
- acceptRanges
- true
-
-
- dirAllowed
- true
-
-
- welcomeServlets
- false
-
-
- redirectWelcome
- false
-
-
- maxCacheSize
- 256000000
-
-
- maxCachedFileSize
- 200000000
-
-
- maxCachedFiles
- 2048
-
-
- etags
- false
-
-
- useFileMappedBuffer
- true
-
- 0
-
-
-
- default
- /
-
-
-
-
-
-
-
- 30
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- index.html
- index.htm
-
-
-
-
-
-
-
- ar
- ISO-8859-6
-
-
- be
- ISO-8859-5
-
-
- bg
- ISO-8859-5
-
-
- ca
- ISO-8859-1
-
-
- cs
- ISO-8859-2
-
-
- da
- ISO-8859-1
-
-
- de
- ISO-8859-1
-
-
- el
- ISO-8859-7
-
-
- en
- ISO-8859-1
-
-
- es
- ISO-8859-1
-
-
- et
- ISO-8859-1
-
-
- fi
- ISO-8859-1
-
-
- fr
- ISO-8859-1
-
-
- hr
- ISO-8859-2
-
-
- hu
- ISO-8859-2
-
-
- is
- ISO-8859-1
-
-
- it
- ISO-8859-1
-
-
- iw
- ISO-8859-8
-
-
- ja
- Shift_JIS
-
-
- ko
- EUC-KR
-
-
- lt
- ISO-8859-2
-
-
- lv
- ISO-8859-2
-
-
- mk
- ISO-8859-5
-
-
- nl
- ISO-8859-1
-
-
- no
- ISO-8859-1
-
-
- pl
- ISO-8859-2
-
-
- pt
- ISO-8859-1
-
-
- ro
- ISO-8859-2
-
-
- ru
- ISO-8859-5
-
-
- sh
- ISO-8859-5
-
-
- sk
- ISO-8859-2
-
-
- sl
- ISO-8859-2
-
-
- sq
- ISO-8859-2
-
-
- sr
- ISO-8859-5
-
-
- sv
- ISO-8859-1
-
-
- tr
- ISO-8859-9
-
-
- uk
- ISO-8859-5
-
-
- zh
- GB2312
-
-
- zh_TW
- Big5
-
-
-
-
-
-
-
-
- Disable TRACE
- /
- TRACE
-
-
-
-
-
- Enable everything but TRACE
- /
- TRACE
-
-
-
-
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-xwiki.xml b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/xwiki.xml
similarity index 100%
rename from xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/jetty-xwiki.xml
rename to xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/etc/xwiki.xml
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/bytebufferpool.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/bytebufferpool.mod
deleted file mode 100644
index 10c542541d88..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/bytebufferpool.mod
+++ /dev/null
@@ -1,58 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Configures the ByteBufferPool used by ServerConnectors.
-The bucket sizes increase linearly.
-Use module "bytebufferpool-quadratic" for a pool that holds more coarse sized buffers.
-
-[depends]
-logging
-
-[xml]
-etc/jetty-bytebufferpool.xml
-
-[ini-template]
-## Minimum capacity of a single ByteBuffer.
-#jetty.byteBufferPool.minCapacity=0
-
-## Maximum capacity of a single ByteBuffer.
-## Requests for ByteBuffers larger than this value results
-## in the ByteBuffer being allocated but not pooled.
-#jetty.byteBufferPool.maxCapacity=65536
-
-## Bucket capacity factor.
-## ByteBuffers are allocated out of buckets that have
-## a capacity that is multiple of this factor.
-#jetty.byteBufferPool.factor=4096
-
-## Maximum size for each bucket (-1 for unbounded).
-#jetty.byteBufferPool.maxBucketSize=-1
-
-## Maximum heap memory held idle by the pool (0 for heuristic, -1 for unlimited).
-#jetty.byteBufferPool.maxHeapMemory=0
-
-## Maximum direct memory held idle by the pool (0 for heuristic, -1 for unlimited).
-#jetty.byteBufferPool.maxDirectMemory=0
-
-## Whether statistics are enabled.
-#jetty.byteBufferPool.statisticsEnabled=false
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/client.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/client.mod
deleted file mode 100644
index 900043c9e9c9..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/client.mod
+++ /dev/null
@@ -1,27 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Adds the Jetty HTTP client to the server classpath.
-
-[lib]
-lib/jetty-client-${jetty.version}.jar
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/console-capture.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/console-capture.mod
deleted file mode 100644
index fb78cc48564f..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/console-capture.mod
+++ /dev/null
@@ -1,51 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Redirects the JVM console stderr and stdout to a rolling log file.
-
-[tags]
-logging
-
-[depends]
-logging
-
-[xml]
-etc/console-capture.xml
-
-[files]
-logs/
-
-[ini-template]
-# tag::documentation[]
-## Logging directory (relative to $JETTY_BASE).
-# jetty.console-capture.dir=./logs
-
-## Whether to append to existing file.
-# jetty.console-capture.append=true
-
-## How many days to retain old log files.
-# jetty.console-capture.retainDays=90
-
-## Timezone ID of the log timestamps, as specified by java.time.ZoneId.
-# jetty.console-capture.timezone=GMT
-# end::documentation[]
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/deploy.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/deploy.mod
deleted file mode 100644
index 716e9f0629da..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/deploy.mod
+++ /dev/null
@@ -1,37 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-This module enables web application deployment from the `$JETTY_BASE/webapps` directory.
-
-[depend]
-server
-
-[lib]
-lib/jetty-deploy-${jetty.version}.jar
-
-[files]
-webapps/
-
-[xml]
-etc/jetty-deploy.xml
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee-webapp.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee-webapp.mod
deleted file mode 100644
index 0a664334541f..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee-webapp.mod
+++ /dev/null
@@ -1,51 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-# tag::description[]
-This module provide common configuration of Java Servlet web applications over all environments.
-# end::description[]
-
-[xml]
-etc/jetty-ee-webapp.xml
-
-[lib]
-lib/jetty-ee-${jetty.version}.jar
-
-[ini-template]
-# tag::ini-template[]
-## Add to the server wide default jars and packages protected or hidden from webapps.
-## Protected (aka System) classes cannot be overridden by a webapp.
-## Hidden (aka Server) classes cannot be seen by a webapp
-## Lists of patterns are comma separated and may be either:
-## + a qualified classname e.g. 'com.acme.Foo'
-## + a package name e.g. 'net.example.'
-## + a jar file e.g. '${jetty.base.uri}/lib/dependency.jar'
-## + a directory of jars,resource or classes e.g. '${jetty.base.uri}/resources'
-## + A pattern preceded with a '-' is an exclusion, all other patterns are inclusions
-##
-## The +=, operator appends to a CSV list with a comma as needed.
-##
-#jetty.server.addProtectedClasses+=,org.example.
-#jetty.server.addHiddenClasses+=,org.example.
-# end::ini-template[]
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-annotations.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-annotations.mod
deleted file mode 100644
index 0e0c0d75d7c8..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-annotations.mod
+++ /dev/null
@@ -1,47 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Enables Annotation scanning for deployed web applications.
-
-[environment]
-ee8
-
-[depend]
-plus
-ee8-plus
-
-[ini]
-ee8.asm.version?=9.7
-ee8.jakarta.annotation.api.version?=1.3.5
-
-[lib]
-lib/jetty-ee8-annotations-${jetty.version}.jar
-lib/ee8-annotations/asm-${ee8.asm.version}.jar
-lib/ee8-annotations/asm-analysis-${ee8.asm.version}.jar
-lib/ee8-annotations/asm-commons-${ee8.asm.version}.jar
-lib/ee8-annotations/asm-tree-${ee8.asm.version}.jar
-lib/ee8-annotations/jakarta.annotation-api-${ee8.jakarta.annotation.api.version}.jar
-
-[jpms]
-add-modules:org.objectweb.asm
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-apache-jsp.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-apache-jsp.mod
deleted file mode 100644
index a9bca961861a..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-apache-jsp.mod
+++ /dev/null
@@ -1,37 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Enables use of the apache implementation of JSP.
-
-[environment]
-ee8
-
-[depend]
-ee8-servlet
-ee8-annotations
-
-[ini]
-ee8.jsp.impl.version?=9.0.90
-
-[lib]
-lib/ee8-apache-jsp/apache-el-${ee8.jsp.impl.version}.jar
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-deploy.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-deploy.mod
deleted file mode 100644
index 371d5789183a..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-deploy.mod
+++ /dev/null
@@ -1,69 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-# tag::description[]
-This module enables webapp deployment from the `$JETTY_BASE/webapps` directory.
-# end::description[]
-
-[environment]
-ee8
-
-[depend]
-deploy
-ee8-webapp
-
-[xml]
-etc/jetty-ee8-deploy.xml
-
-[ini-template]
-# tag::ini-template[]
-## Monitored directory name (relative to $jetty.base)
-# jetty.deploy.monitoredDir=webapps
-
-## Defaults Descriptor for all deployed webapps
-# jetty.deploy.defaultsDescriptorPath=${jetty.base}/etc/webdefault-ee8.xml
-
-## Monitored directory scan period (seconds)
-# jetty.deploy.scanInterval=0
-
-## Whether to extract *.war files
-# jetty.deploy.extractWars=true
-
-## Whether to give the parent classloader priority
-# jetty.deploy.parentLoaderPriority=true
-
-## Comma separated list of configuration classes to set.
-# jetty.deploy.configurationClasses=
-
-## Pattern to select jars from the container classloader to be scanned (or null to scan no jars)
-# jetty.deploy.containerScanJarPattern=.*/jetty-servlet-api-[^/]*\.jar$|.*/javax.servlet.jsp.jstl-.*\.jar$
-
-## Pattern to select jars from the container classloader to be scanned (or null to scan all jars).
-# jetty.deploy.webInfScanJarPattern=
-
-## Pattern to exclude discovered ServletContainerInitializers
-# jetty.deploy.servletContainerInitializerExclusionPattern=
-
-## Order of discovered ServletContainerInitializers
-# jetty.deploy.servletContainerInitializerOrder=
-# end::ini-template[]
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-jndi.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-jndi.mod
deleted file mode 100644
index 9135ddf9f42e..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-jndi.mod
+++ /dev/null
@@ -1,33 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Adds the Jetty EE8 JNDI reference factories
-
-[environment]
-ee8
-
-[depend]
-jndi
-
-[lib]
-lib/jetty-ee8-jndi-${jetty.version}.jar
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-plus.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-plus.mod
deleted file mode 100644
index 9cc1f0d8fb9e..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-plus.mod
+++ /dev/null
@@ -1,38 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Enables Servlet 3.1 resource injection.
-
-[environment]
-ee8
-
-[depend]
-server
-jndi
-plus
-ee8-security
-ee8-webapp
-
-[lib]
-lib/jetty-ee8-plus-${jetty.version}.jar
-lib/jakarta.transaction-api-1.3.3.jar
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-security.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-security.mod
deleted file mode 100644
index b334fae5a064..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-security.mod
+++ /dev/null
@@ -1,35 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Adds servlet standard security handling to the classpath.
-
-[environment]
-ee8
-
-[depend]
-server
-security
-ee8-servlet
-
-[lib]
-lib/jetty-ee8-security-${jetty.version}.jar
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-servlet.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-servlet.mod
deleted file mode 100644
index 28eaecb54d28..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-servlet.mod
+++ /dev/null
@@ -1,36 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Enables standard Servlet handling.
-
-[environment]
-ee8
-
-[depend]
-server
-sessions
-
-[lib]
-lib/jetty-servlet-api-4.0.6.jar
-lib/jetty-ee8-nested-${jetty.version}.jar
-lib/jetty-ee8-servlet-${jetty.version}.jar
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-webapp.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-webapp.mod
deleted file mode 100644
index 5645f4d3822f..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-webapp.mod
+++ /dev/null
@@ -1,61 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Adds support for servlet specification web applications to the server classpath.
-Without this, only Jetty-specific handlers may be deployed.
-
-[environment]
-ee8
-
-[depend]
-ee-webapp
-ee8-servlet
-ee8-security
-
-[xml]
-etc/jetty-ee8-webapp.xml
-
-[lib]
-lib/jetty-ee8-webapp-${jetty.version}.jar
-
-[ini-template]
-## Add to the environment wide default jars and packages protected or hidden from webapps.
-## System (aka Protected) classes cannot be overridden by a webapp.
-## Server (aka Hidden) classes cannot be seen by a webapp
-## Lists of patterns are comma separated and may be either:
-## + a qualified classname e.g. 'com.acme.Foo'
-## + a package name e.g. 'net.example.'
-## + a jar file e.g. '${jetty.base.uri}/lib/dependency.jar'
-## + a directory of jars,resource or classes e.g. '${jetty.base.uri}/resources'
-## + A pattern preceded with a '-' is an exclusion, all other patterns are inclusions
-##
-## The +=, operator appends to a CSV list with a comma as needed.
-##
-#jetty.webapp.addProtectedClasses+=,org.example.
-#jetty.webapp.addHiddenClasses+=,org.example.
-
-[ini]
-contextHandlerClass=org.eclipse.jetty.ee8.webapp.WebAppContext
-
-[jpms]
-add-modules:java.instrument
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-websocket-javax.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-websocket-javax.mod
deleted file mode 100644
index 8150285456d2..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-websocket-javax.mod
+++ /dev/null
@@ -1,44 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Enable javax.websocket APIs for deployed web applications.
-
-[environment]
-ee8
-
-[tags]
-websocket
-
-[depend]
-client
-ee8-annotations
-
-[lib]
-lib/jetty-websocket-core-common-${jetty.version}.jar
-lib/jetty-websocket-core-client-${jetty.version}.jar
-lib/jetty-websocket-core-server-${jetty.version}.jar
-lib/ee8-websocket/jetty-ee8-websocket-servlet-${jetty.version}.jar
-lib/ee8-websocket/jetty-javax-websocket-api-1.1.2.jar
-lib/ee8-websocket/jetty-ee8-websocket-javax-client-${jetty.version}.jar
-lib/ee8-websocket/jetty-ee8-websocket-javax-common-${jetty.version}.jar
-lib/ee8-websocket/jetty-ee8-websocket-javax-server-${jetty.version}.jar
\ No newline at end of file
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-websocket-jetty.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-websocket-jetty.mod
deleted file mode 100644
index 73ac3941e0c7..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ee8-websocket-jetty.mod
+++ /dev/null
@@ -1,42 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Enable the Jetty WebSocket API support for deployed web applications.
-
-[environment]
-ee8
-
-[tags]
-websocket
-
-[depend]
-ee8-annotations
-
-[lib]
-lib/jetty-websocket-core-common-${jetty.version}.jar
-lib/jetty-websocket-core-server-${jetty.version}.jar
-lib/ee8-websocket/jetty-ee8-websocket-servlet-${jetty.version}.jar
-lib/ee8-websocket/jetty-ee8-websocket-jetty-api-${jetty.version}.jar
-lib/ee8-websocket/jetty-ee8-websocket-jetty-common-${jetty.version}.jar
-lib/ee8-websocket/jetty-ee8-websocket-jetty-server-${jetty.version}.jar
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ext.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ext.mod
deleted file mode 100644
index 17a98d590e5f..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ext.mod
+++ /dev/null
@@ -1,35 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Adds the jar file from $JETTY_HOME/lib/ext and $JETTY_BASE/lib/ext to the server classpath.
-
-[tags]
-classpath
-
-[lib]
-lib/ext/**.jar
-
-[files]
-lib/
-lib/ext/
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/http-forwarded.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/http-forwarded.mod
deleted file mode 100644
index 63eb39e7d8f2..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/http-forwarded.mod
+++ /dev/null
@@ -1,78 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Enables processing of the "Forwarded" HTTP header (and its predecessors "X-Forwarded-*" HTTP headers).
-The "Forwarded" HTTP header is added by intermediaries to provide information about the clients.
-
-[tags]
-connector
-
-[depend]
-http
-
-[xml]
-etc/jetty-http-forwarded.xml
-
-[ini-template]
-# tag::documentation[]
-### ForwardedRequestCustomizer Configuration
-
-## Whether to process only the RFC7239 "Forwarded" header.
-## "X-Forwarded-*" headers are not processed.
-# jetty.httpConfig.forwardedOnly=false
-
-## Whether the address obtained from "Forwarded: by=" or
-## "X-Forwarded-Server" is used in the request authority.
-# jetty.httpConfig.forwardedProxyAsAuthority=false
-
-## Whether the "X-Forwarded-Port" header is used in the request authority,
-## or else it is the remote client port.
-# jetty.httpConfig.forwardedPortAsAuthority=true
-
-## The name of the RFC 7239 HTTP header.
-# jetty.httpConfig.forwardedHeader=Forwarded
-
-## The name of the obsolete forwarded host HTTP header.
-# jetty.httpConfig.forwardedHostHeader=X-Forwarded-Host
-
-## The name of the obsolete forwarded server HTTP header.
-# jetty.httpConfig.forwardedServerHeader=X-Forwarded-Server
-
-## The name of the obsolete forwarded scheme HTTP header.
-# jetty.httpConfig.forwardedProtoHeader=X-Forwarded-Proto
-
-## The name of the obsolete forwarded for HTTP header.
-# jetty.httpConfig.forwardedForHeader=X-Forwarded-For
-
-## The name of the obsolete forwarded port HTTP header.
-# jetty.httpConfig.forwardedPortHeader=X-Forwarded-Port
-
-## The name of the obsolete forwarded https HTTP header.
-# jetty.httpConfig.forwardedHttpsHeader=X-Proxied-Https
-
-## The name of the obsolete forwarded SSL session ID HTTP header.
-# jetty.httpConfig.forwardedSslSessionIdHeader=Proxy-ssl-id
-
-## The name of the obsolete forwarded SSL cipher HTTP header.
-# jetty.httpConfig.forwardedCipherSuiteHeader=Proxy-auth-cert
-# end::documentation[]
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/http.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/http.mod
deleted file mode 100644
index b135a62ab5aa..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/http.mod
+++ /dev/null
@@ -1,78 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Enables a clear-text HTTP connector.
-By default clear-text HTTP/1.1 is enabled, and clear-text HTTP/2 may be added by enabling the "http2c" module.
-
-[tags]
-connector
-http
-
-[depend]
-server
-
-[xml]
-etc/jetty-http.xml
-
-[ini-template]
-# tag::documentation[]
-### Clear-Text HTTP Connector Configuration
-
-## The host/address to bind the connector to.
-# jetty.http.host=0.0.0.0
-
-## The port the connector listens on.
-# jetty.http.port=8080
-
-## The connector idle timeout, in milliseconds.
-# jetty.http.idleTimeout=30000
-
-## The number of acceptors (-1 picks a default value based on number of cores).
-# jetty.http.acceptors=1
-
-## The number of selectors (-1 picks a default value based on number of cores).
-# jetty.http.selectors=-1
-
-## The ServerSocketChannel accept queue backlog (0 picks the platform default).
-# jetty.http.acceptQueueSize=0
-
-## The thread priority delta to give to acceptor threads.
-# jetty.http.acceptorPriorityDelta=0
-
-## Whether to enable the SO_REUSEADDR socket option.
-# jetty.http.reuseAddress=true
-
-## Whether to enable the SO_REUSEPORT socket option.
-# jetty.http.reusePort=false
-
-## Whether to enable the TCP_NODELAY socket option on accepted sockets.
-# jetty.http.acceptedTcpNoDelay=true
-
-## The SO_RCVBUF socket option to set on accepted sockets.
-## A value of -1 indicates that the platform default is used.
-# jetty.http.acceptedReceiveBufferSize=-1
-
-## The SO_SNDBUF socket option to set on accepted sockets.
-## A value of -1 indicates that the platform default is used.
-# jetty.http.acceptedSendBufferSize=-1
-# end::documentation[]
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/https.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/https.mod
deleted file mode 100644
index 6a09c385c745..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/https.mod
+++ /dev/null
@@ -1,40 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Adds HTTPS protocol support to the TLS(SSL) Connector.
-
-[tags]
-connector
-https
-http
-ssl
-
-[depend]
-ssl
-
-[after]
-http-forwarded
-
-[xml]
-etc/jetty-https.xml
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/jmx.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/jmx.mod
deleted file mode 100644
index aee601f9d41e..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/jmx.mod
+++ /dev/null
@@ -1,35 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-# tag::description[]
-This module enables local Java Management Extension (JMX) support for Jetty components.
-# end::description[]
-
-[depend]
-server
-
-[lib]
-lib/jetty-jmx-${jetty.version}.jar
-
-[xml]
-etc/jetty-jmx.xml
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/jndi.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/jndi.mod
deleted file mode 100644
index 8870763db9c0..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/jndi.mod
+++ /dev/null
@@ -1,31 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Adds the Jetty JNDI implementation to the classpath.
-
-[depend]
-plus
-server
-
-[lib]
-lib/jetty-jndi-${jetty.version}.jar
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/jvm.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/jvm.mod
deleted file mode 100644
index 03096bf12007..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/jvm.mod
+++ /dev/null
@@ -1,47 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Creates an ini template for setting JVM arguments (eg -Xmx ).
-
-[ini-template]
-## JVM Configuration
-## If JVM args are include in an ini file then --exec is needed
-## to start a new JVM from start.jar with the extra args.
-##
-## If you wish to avoid an extra JVM running, place JVM args
-## on the normal command line and do not use --exec
-# --exec
-# -Xmx2000m
-# -Xmn512m
-# -XX:+UseConcMarkSweepGC
-# -XX:ParallelCMSThreads=2
-# -XX:+CMSClassUnloadingEnabled
-# -XX:+UseCMSCompactAtFullCollection
-# -XX:CMSInitiatingOccupancyFraction=80
-# -internal:gc
-# -XX:+PrintGCDateStamps
-# -XX:+PrintGCTimeStamps
-# -XX:+PrintGCDetails
-# -XX:+PrintTenuringDistribution
-# -XX:+PrintCommandLineFlags
-# -XX:+DisableExplicitGC
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/logging/jetty/resources/jetty-logging.properties b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/logging/jetty/resources/jetty-logging.properties
deleted file mode 100644
index 17e9bdcf9e21..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/logging/jetty/resources/jetty-logging.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-## Set logging levels from: ALL, TRACE, DEBUG, INFO, WARN, ERROR, OFF
-org.eclipse.jetty.LEVEL=INFO
-## Configure a level for an arbitrary logger tree
-#com.example.LEVEL=INFO
-## Configure a level for specific logger
-#com.example.MyComponent.LEVEL=INFO
-## Configure JMX Context Name
-# org.eclipse.jetty.logging.jmx.context=JettyServer
-## Hide stacks traces in an arbitrary logger tree
-#com.example.STACKS=false
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/logging/slf4j.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/logging/slf4j.mod
deleted file mode 100644
index f44b6da64ba4..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/logging/slf4j.mod
+++ /dev/null
@@ -1,39 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Configures logging to use SLF4J.
-A specific implementation of SLF4J is not enabled.
-If one is not selected then NOP implementation will be used.
-
-[tags]
-logging
-
-[provides]
-slf4j
-
-[lib]
-lib/logging/slf4j-api-${slf4j.version}.jar
-
-[ini]
-slf4j.version?=2.0.13
-jetty.webapp.addHiddenClasses+=,org.slf4j.
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/plus.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/plus.mod
deleted file mode 100644
index 45c285e5618b..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/plus.mod
+++ /dev/null
@@ -1,30 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Adds the Jetty Plus JNDI support to the classpath.
-
-[depend]
-server
-
-[lib]
-lib/jetty-plus-${jetty.version}.jar
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/requestlog.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/requestlog.mod
deleted file mode 100644
index ace6429c03bb..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/requestlog.mod
+++ /dev/null
@@ -1,64 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Logs requests using CustomRequestLog and AsyncRequestLogWriter.
-
-[tags]
-requestlog
-logging
-
-[depend]
-server
-
-[xml]
-etc/jetty-requestlog.xml
-
-[files]
-logs/
-
-[ini]
-jetty.requestlog.dir?=logs
-
-[ini-template]
-# tag::documentation[]
-## Format string
-# jetty.requestlog.formatString=%{client}a - %u %{dd/MMM/yyyy:HH:mm:ss ZZZ|GMT}t "%r" %s %O "%{Referer}i" "%{User-Agent}i"
-
-## Logging directory (relative to $jetty.base)
-# jetty.requestlog.dir=logs
-
-## File path
-# jetty.requestlog.filePath=${jetty.requestlog.dir}/yyyy_mm_dd.request.log
-
-## Date format for rollovered files (uses SimpleDateFormat syntax)
-# jetty.requestlog.filenameDateFormat=yyyy_MM_dd
-
-## How many days to retain old log files
-# jetty.requestlog.retainDays=90
-
-## Whether to append to existing file
-# jetty.requestlog.append=false
-
-## Timezone of the log file rollover
-# jetty.requestlog.timezone=GMT
-# end::documentation[]
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/resources.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/resources.mod
deleted file mode 100644
index cf2e9a24ea44..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/resources.mod
+++ /dev/null
@@ -1,36 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-# tag::description[]
-This module adds the `$JETTY_BASE/resources` directory to the server's classpath.
-# end::description[]
-
-[tags]
-classpath
-
-[lib]
-resources/
-
-[files]
-resources/
-
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/security.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/security.mod
deleted file mode 100644
index 7a0646e13b8c..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/security.mod
+++ /dev/null
@@ -1,30 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Adds core security handling to the classpath.
-
-[depend]
-server
-
-[lib]
-lib/jetty-security-${jetty.version}.jar
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/server.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/server.mod
deleted file mode 100644
index 4be55e5f8e95..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/server.mod
+++ /dev/null
@@ -1,147 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Enables and configures the Jetty server.
-This module does not enable any network protocol support.
-To enable a specific network protocol such as HTTP/1.1, you must enable the correspondent Jetty module.
-
-[after]
-jvm
-ext
-resources
-
-[depend]
-threadpool
-bytebufferpool
-logging
-
-[lib]
-lib/jetty-http-${jetty.version}.jar
-lib/jetty-server-${jetty.version}.jar
-lib/jetty-xml-${jetty.version}.jar
-lib/jetty-util-${jetty.version}.jar
-lib/jetty-io-${jetty.version}.jar
-
-[xml]
-etc/jetty.xml
-
-[ini-template]
-# tag::documentation-http-config[]
-### Common HTTP configuration
-## Scheme to use to build URIs for secure redirects
-# jetty.httpConfig.secureScheme=https
-
-## Port to use to build URIs for secure redirects
-# jetty.httpConfig.securePort=8443
-
-## Response content buffer size (in bytes)
-# jetty.httpConfig.outputBufferSize=32768
-
-## Max response content write length that is buffered (in bytes)
-# jetty.httpConfig.outputAggregationSize=8192
-
-## If HTTP/1.x persistent connections should be enabled
-# jetty.httpConfig.persistentConnectionsEnabled=true
-
-## Max request headers size (in bytes)
-# jetty.httpConfig.requestHeaderSize=8192
-
-## Max response headers size (in bytes)
-# jetty.httpConfig.responseHeaderSize=8192
-
-## Whether to send the Server: header
-# jetty.httpConfig.sendServerVersion=true
-
-## Whether to send the Date: header
-# jetty.httpConfig.sendDateHeader=false
-
-## Max per-connection header cache size (in nodes)
-# jetty.httpConfig.headerCacheSize=1024
-
-## Whether, for requests with content, delay dispatch until some content has arrived
-# jetty.httpConfig.delayDispatchUntilContent=true
-
-## Maximum number of error dispatches to prevent looping
-# jetty.httpConfig.maxErrorDispatches=10
-
-## Relative Redirect Locations allowed
-# jetty.httpConfig.relativeRedirectAllowed=true
-
-## Whether to use direct ByteBuffers for reading or writing
-# jetty.httpConfig.useInputDirectByteBuffers=true
-# jetty.httpConfig.useOutputDirectByteBuffers=true
-# end::documentation-http-config[]
-
-# tag::documentation-server-compliance[]
-## HTTP Compliance: RFC7230, RFC7230_LEGACY, RFC2616, RFC2616_LEGACY, LEGACY
-# jetty.httpConfig.compliance=RFC7230
-
-## URI Compliance: DEFAULT, LEGACY, RFC3986, RFC3986_UNAMBIGUOUS, UNSAFE
-# jetty.httpConfig.uriCompliance=DEFAULT
-
-## Cookie compliance mode for parsing request Cookie headers: RFC6265_STRICT, RFC6265, RFC6265_LEGACY, RFC2965, RFC2965_LEGACY
-# jetty.httpConfig.requestCookieCompliance=RFC6265
-
-## Cookie compliance mode for generating response Set-Cookie: RFC2965, RFC6265
-# jetty.httpConfig.responseCookieCompliance=RFC6265
-# end::documentation-server-compliance[]
-
-# tag::documentation-server-config[]
-### Server configuration
-## Whether ctrl+c on the console gracefully stops the Jetty server
-# jetty.server.stopAtShutdown=true
-
-## Timeout in ms to apply when stopping the server gracefully
-# jetty.server.stopTimeout=5000
-
-## Dump the state of the Jetty server, components, and webapps after startup
-# jetty.server.dumpAfterStart=false
-
-## The temporary directory used by the Jetty server and as a root for its contexts
-# jetty.server.tempDirectory=
-
-## Dump the state of the Jetty server, components, and webapps before shutdown
-# jetty.server.dumpBeforeStop=false
-# end::documentation-server-config[]
-
-# tag::documentation-scheduler-config[]
-### Server Scheduler Configuration
-## The scheduler thread name, defaults to "Scheduler-{hashCode()}" if blank.
-# jetty.scheduler.name=
-
-## Whether the server scheduler threads are daemon.
-# jetty.scheduler.daemon=false
-
-## The number of server scheduler threads.
-# jetty.scheduler.threads=1
-# end::documentation-scheduler-config[]
-
-## Whether the handlers of the ContextHandlerCollection can be updated once the server is started
-## If set to false, then -deploy module jetty.deploy.scanInterval should also be set to 0.
-# jetty.server.contexts.dynamic=true
-
-## Should the DefaultHandler serve the jetty favicon.ico from the root.
-# jetty.server.default.serveFavIcon=true
-
-## Should the DefaultHandler show a list of known contexts in a root 404 response.
-# jetty.server.default.showContexts=true
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/sessions.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/sessions.mod
deleted file mode 100644
index a4cebd14eb42..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/sessions.mod
+++ /dev/null
@@ -1,47 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Enables session management.
-By enabling this module, it allows session management to be configured via the ini templates
-created or by enabling other session-cache or session-store modules.
-Without this module enabled,
-the server may still use sessions, but their management cannot be configured.
-
-[tags]
-session
-
-[depends]
-server
-
-[lib]
-lib/jetty-session-${jetty.version}.jar
-
-[xml]
-etc/sessions/id-manager.xml
-
-[ini-template]
-## The name to uniquely identify this server instance
-#jetty.sessionIdManager.workerName=node1
-
-## Period between runs of the session scavenger (in seconds)
-#jetty.sessionScavengeInterval.seconds=600
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ssl.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ssl.mod
deleted file mode 100644
index 9b9595fea47b..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/ssl.mod
+++ /dev/null
@@ -1,158 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Enables a TLS (SSL) connector to support secure protocols.
-Secure HTTP/1.1 is provided by enabling the "https" module and secure HTTP/2 is provided by enabling the "http2" module.
-
-[tags]
-connector
-ssl
-internal
-
-[depend]
-server
-
-[xml]
-etc/jetty-ssl.xml
-etc/jetty-ssl-context.xml
-
-[ini-template]
-# tag::documentation-connector[]
-### TLS (SSL) Connector Configuration
-
-## The host/address to bind the connector to.
-# jetty.ssl.host=0.0.0.0
-
-## The port the connector listens on.
-# jetty.ssl.port=8443
-
-## The connector idle timeout, in milliseconds.
-# jetty.ssl.idleTimeout=30000
-
-## The number of acceptors (-1 picks a default value based on number of cores).
-# jetty.ssl.acceptors=1
-
-## The number of selectors (-1 picks a default value based on number of cores).
-# jetty.ssl.selectors=-1
-
-## The ServerSocketChannel accept queue backlog (0 picks the platform default).
-# jetty.ssl.acceptQueueSize=0
-
-## The thread priority delta to give to acceptor threads.
-# jetty.ssl.acceptorPriorityDelta=0
-
-## Whether to enable the SO_REUSEADDR socket option.
-# jetty.ssl.reuseAddress=true
-
-## Whether to enable the SO_REUSEPORT socket option.
-# jetty.ssl.reusePort=false
-
-## Whether to enable the TCP_NODELAY socket option on accepted sockets.
-# jetty.ssl.acceptedTcpNoDelay=true
-
-## The SO_RCVBUF socket option to set on accepted sockets.
-## A value of -1 indicates that the platform default is used.
-# jetty.ssl.acceptedReceiveBufferSize=-1
-
-## The SO_SNDBUF socket option to set on accepted sockets.
-## A value of -1 indicates that the platform default is used.
-# jetty.ssl.acceptedSendBufferSize=-1
-
-## Whether client SNI data is required for all secure connections.
-## When SNI is required, clients that do not send SNI data are rejected with an HTTP 400 response.
-# jetty.ssl.sniRequired=false
-
-## Whether client SNI data is checked to match CN and SAN in server certificates.
-## When SNI is checked, if the match fails the connection is rejected with an HTTP 400 response.
-# jetty.ssl.sniHostCheck=true
-
-## The max age, in seconds, for the Strict-Transport-Security response header.
-# jetty.ssl.stsMaxAgeSeconds=31536000
-
-## Whether to include the subdomain property in any Strict-Transport-Security header.
-# jetty.ssl.stsIncludeSubdomains=true
-# end::documentation-connector[]
-
-# tag::documentation-ssl-context[]
-### SslContextFactory Configuration
-## Note that OBF passwords are not secure, just protected from casual observation.
-
-## Whether client SNI data is required for all secure connections.
-## When SNI is required, clients that do not send SNI data are rejected with a TLS handshake error.
-# jetty.sslContext.sniRequired=false
-
-## The Endpoint Identification Algorithm.
-## Same as javax.net.ssl.SSLParameters#setEndpointIdentificationAlgorithm(String).
-# jetty.sslContext.endpointIdentificationAlgorithm=
-
-## The JSSE Provider.
-# jetty.sslContext.provider=
-
-## The KeyStore file path, either an absolute path or a relative path to $JETTY_BASE.
-# jetty.sslContext.keyStorePath=etc/keystore.p12
-
-## The TrustStore file path, either an absolute path or a relative path to $JETTY_BASE.
-# jetty.sslContext.trustStorePath=etc/keystore.p12
-
-## The KeyStore password.
-# jetty.sslContext.keyStorePassword=
-
-## The Keystore type.
-# jetty.sslContext.keyStoreType=PKCS12
-
-## The KeyStore provider.
-# jetty.sslContext.keyStoreProvider=
-
-## The KeyManager password.
-# jetty.sslContext.keyManagerPassword=
-
-## The TrustStore password.
-# jetty.sslContext.trustStorePassword=
-
-## The TrustStore type.
-# jetty.sslContext.trustStoreType=PKCS12
-
-## The TrustStore provider.
-# jetty.sslContext.trustStoreProvider=
-
-## Whether client certificate authentication is required.
-# jetty.sslContext.needClientAuth=false
-
-## Whether client certificate authentication is desired, but not required.
-# jetty.sslContext.wantClientAuth=false
-
-## Whether cipher order is significant.
-# jetty.sslContext.useCipherSuitesOrder=true
-
-## The SSLSession cache size.
-# jetty.sslContext.sslSessionCacheSize=-1
-
-## The SSLSession cache timeout (in seconds).
-# jetty.sslContext.sslSessionTimeout=-1
-
-## Whether TLS renegotiation is allowed.
-# jetty.sslContext.renegotiationAllowed=true
-
-## The max number of TLS renegotiations per connection.
-# jetty.sslContext.renegotiationLimit=5
-# end::documentation-ssl-context[]
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/threadpool.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/threadpool.mod
deleted file mode 100644
index 681e970f7e6b..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/threadpool.mod
+++ /dev/null
@@ -1,61 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-# DO NOT EDIT - See: https://jetty.org/docs/index.html
-
-[description]
-Enables and configures the Server ThreadPool.
-
-[depends]
-logging
-
-[provides]
-threadpool|default
-
-[xml]
-etc/jetty-threadpool.xml
-
-[ini-template]
-# tag::documentation[]
-## Thread name prefix.
-#jetty.threadPool.namePrefix=qtp
-
-## Minimum number of pooled threads.
-#jetty.threadPool.minThreads=10
-
-## Maximum number of pooled threads.
-#jetty.threadPool.maxThreads=200
-
-## Number of reserved threads (-1 for heuristic).
-#jetty.threadPool.reservedThreads=-1
-
-## Whether to use virtual threads, if the runtime supports them.
-## Deprecated, use Jetty module 'threadpool-virtual' instead.
-#jetty.threadPool.useVirtualThreads=false
-
-## Thread idle timeout (in milliseconds).
-#jetty.threadPool.idleTimeout=60000
-
-## The max number of idle threads that are evicted in one idleTimeout period.
-#jetty.threadPool.maxEvictCount=1
-
-## Whether to output a detailed dump.
-#jetty.threadPool.detailedDump=false
-# end::documentation[]
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/xwiki-logging.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/xwiki-logging.mod
deleted file mode 100644
index 23b00e438f35..000000000000
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/xwiki-logging.mod
+++ /dev/null
@@ -1,43 +0,0 @@
-# ---------------------------------------------------------------------------
-# See the NOTICE file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-# ---------------------------------------------------------------------------
-
-[description]
-Base configuration for the jetty logging mechanism.
-Provides a ${jetty.base}/resources/jetty-logging.properties.
-
-[tags]
-logging
-
-[depend]
-logging/slf4j
-resources
-
-[provides]
-logging|default
-
-[files]
-basehome:modules/logging/jetty
-
-[lib]
-lib/logging/jetty-slf4j-impl-${jetty.version}.jar
-
-[ini]
-jetty.webapp.addHiddenClasses+=,org.eclipse.jetty.logging.
-jetty.webapp.addHiddenClasses+=,${jetty.home.uri}/lib/logging/
diff --git a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/xwiki.mod b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/xwiki.mod
index df6f98b11487..feef54c548df 100644
--- a/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/xwiki.mod
+++ b/xwiki-platform-tools/xwiki-platform-tool-jetty/xwiki-platform-tool-jetty-resources/src/main/resources/jetty/modules/xwiki.mod
@@ -23,18 +23,13 @@
[depend]
ext
-resources
-server
-logging
+console-capture
+ee10-apache-jsp
+ee10-deploy
+ee10-websocket-jakarta
http
http-forwarded
-ee8-annotations
-ee8-deploy
-requestlog
-ee8-websocket-javax
-ee8-websocket-jetty
-ee8-apache-jsp
-console-capture
+work
[xml]
-etc/jetty-xwiki.xml
+etc/xwiki.xml
diff --git a/xwiki-platform-tools/xwiki-platform-tool-packager-plugin/pom.xml b/xwiki-platform-tools/xwiki-platform-tool-packager-plugin/pom.xml
index f0c5b5fdfed4..6928664f7544 100644
--- a/xwiki-platform-tools/xwiki-platform-tool-packager-plugin/pom.xml
+++ b/xwiki-platform-tools/xwiki-platform-tool-packager-plugin/pom.xml
@@ -148,8 +148,8 @@
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
runtime
diff --git a/xwiki-platform-tools/xwiki-platform-tool-provision-plugin/pom.xml b/xwiki-platform-tools/xwiki-platform-tool-provision-plugin/pom.xml
index 9fb91a455286..b2d6b473a3b9 100644
--- a/xwiki-platform-tools/xwiki-platform-tool-provision-plugin/pom.xml
+++ b/xwiki-platform-tools/xwiki-platform-tool-provision-plugin/pom.xml
@@ -85,8 +85,8 @@
commons-httpclient
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
compile
diff --git a/xwiki-platform-tools/xwiki-platform-tool-rootwebapp/pom.xml b/xwiki-platform-tools/xwiki-platform-tool-rootwebapp/pom.xml
index 560aaf4b11d0..4981f2099c68 100644
--- a/xwiki-platform-tools/xwiki-platform-tool-rootwebapp/pom.xml
+++ b/xwiki-platform-tools/xwiki-platform-tool-rootwebapp/pom.xml
@@ -36,8 +36,8 @@
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
diff --git a/xwiki-platform-tools/xwiki-platform-tool-rootwebapp/src/main/java/com/xpn/xwiki/XWikiRootServlet.java b/xwiki-platform-tools/xwiki-platform-tool-rootwebapp/src/main/java/com/xpn/xwiki/XWikiRootServlet.java
index 520be6492701..a8f5dc303995 100644
--- a/xwiki-platform-tools/xwiki-platform-tool-rootwebapp/src/main/java/com/xpn/xwiki/XWikiRootServlet.java
+++ b/xwiki-platform-tools/xwiki-platform-tool-rootwebapp/src/main/java/com/xpn/xwiki/XWikiRootServlet.java
@@ -21,10 +21,10 @@
import java.io.IOException;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* The root servlet for XWiki. The purpose of this servlet is to respond to WebDAV requests correctly and to redirect
diff --git a/xwiki-platform-tools/xwiki-platform-tool-standards-validator/pom.xml b/xwiki-platform-tools/xwiki-platform-tool-standards-validator/pom.xml
index ae12e20c606e..2646e48e859a 100644
--- a/xwiki-platform-tools/xwiki-platform-tool-standards-validator/pom.xml
+++ b/xwiki-platform-tools/xwiki-platform-tool-standards-validator/pom.xml
@@ -76,8 +76,8 @@
jetty-server
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
diff --git a/xwiki-platform-tools/xwiki-platform-tool-xmldoc-update-plugin/pom.xml b/xwiki-platform-tools/xwiki-platform-tool-xmldoc-update-plugin/pom.xml
index 16bb061e3d3c..a00c7ee987e7 100644
--- a/xwiki-platform-tools/xwiki-platform-tool-xmldoc-update-plugin/pom.xml
+++ b/xwiki-platform-tools/xwiki-platform-tool-xmldoc-update-plugin/pom.xml
@@ -53,8 +53,8 @@
${commons.version}
- javax.servlet
- javax.servlet-api
+ jakarta.servlet
+ jakarta.servlet-api
compile
@@ -106,6 +106,7 @@
log4j-over-slf4j
runtime
+
org.xwiki.platform