Skip to content

Commit

Permalink
XCOMMONS-2963: Upgrade to Servlet 5.0
Browse files Browse the repository at this point in the history
* move to a jakarta based Jetty 12
  * also modify how the custom jetty package is built to understand better what are the customizations and make upgrades a lot easier

XCOMMONS-2994: Upgrade to Websocket 2.1.1
XCOMMONS-2108: Upgrade to Bean Validation 3.0.2
XCOMMONS-2109: Upgrade to Hibernate Validator 8.0.1
XCOMMONS-2475: Use Expressly instead of Apache EL
XWIKI-13963: Stop relying on the application server by default to resolve relative redirect URLs
XWIKI-22586: Check all redirect URLs
  • Loading branch information
tmortagne committed Oct 22, 2024
1 parent 754397b commit 6da9ea4
Show file tree
Hide file tree
Showing 289 changed files with 3,844 additions and 4,826 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@
<jetty.server.version>12.0.12</jetty.server.version>
<jetty.client.version>10.0.24</jetty.client.version>
<jetty.version>${jetty.client.version}</jetty.version>
<!-- Force using the version of slf4j from Jetty dependencies instead of the one set by XWiki. The version used
by jetty is referenced in its mod files. When upgrading Jetty, check the version of SF4J used and set the
version here. -->
<jetty.server.slf4j.version>2.0.13</jetty.server.slf4j.version>
<netty.version>4.1.114.Final</netty.version>
<hibernate.version>5.6.15.Final</hibernate.version>
<dockerJava.version>3.4.0</dockerJava.version>
Expand Down Expand Up @@ -1093,6 +1089,10 @@
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>jakarta.inject</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
108 changes: 104 additions & 4 deletions xwiki-platform-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,110 @@
Single justification example:
-->




<!-- Jakarta -->
<revapi.differences>
<justification>revapi false positives</justification>
<criticality>allowed</criticality>
<differences>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>java.method.addedToInterface</code>
<new>.*@ com.xpn.xwiki.web.XWikiResponse</new>
</item>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>java.method.addedToInterface</code>
<new>.*@ com.xpn.xwiki.web.XWikiRequest</new>
</item>
<item>
<ignore>true</ignore>
<code>java.class.nonFinalClassInheritsFromNewClass</code>
<old>class com.xpn.xwiki.render.ScriptXWikiServletRequest</old>
<new>class com.xpn.xwiki.render.ScriptXWikiServletRequest</new>
<superClass>javax.servlet.ServletRequestWrapper</superClass>
</item>
<item>
<ignore>true</ignore>
<code>java.class.nonFinalClassInheritsFromNewClass</code>
<old>class com.xpn.xwiki.web.WrappingXWikiRequest</old>
<new>class com.xpn.xwiki.web.WrappingXWikiRequest</new>
<superClass>javax.servlet.ServletRequestWrapper</superClass>
</item>
</differences>
</revapi.differences>
<revapi.differences>
<justification>Move to Jakarta</justification>
<criticality>highlight</criticality>
<differences>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>.*</code>
<old>.*org.xwiki.websocket.AbstractXWikiEndpoint.*</old>
</item>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>.*</code>
<old>.*org.xwiki.container.servlet.SetThreadNameServletRequestListener.*</old>
</item>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>.*</code>
<old>.*org.xwiki.resource.servlet.ResourceReferenceHandlerServlet.*</old>
</item>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>.*</code>
<old>.*org.xwiki.resource.servlet.RoutingFilter.*</old>
</item>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>.*</code>
<old>.*org.xwiki.wysiwyg.filter.ConversionFilter.*</old>
</item>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>.*</code>
<old>.*com.xpn.xwiki.web.ActionFilter.*</old>
</item>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>.*</code>
<old>.*com.xpn.xwiki.web.HomePageRedirectServlet.*</old>
</item>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>.*</code>
<old>.*com.xpn.xwiki.web.LegacyActionServlet.*</old>
</item>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>.*</code>
<old>.*org.xwiki.container.servlet.XWikiServletContextListener.*</old>
</item>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>.*</code>
<old>.*com.xpn.xwiki.web.XWikiContextInitializationFilter.*</old>
</item>
<item>
<ignore>true</ignore>
<code>java.class.removed</code>
<old>class org.xwiki.wysiwyg.filter.XWikiContextInitializationFilter</old>
</item>
</differences>
</revapi.differences>
</analysisConfiguration>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@
</dependency>
<!-- We want to log the Servlet Container name/version in the ping -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>

<!-- Test Dependencies -->
<dependency>
<groupId>org.testcontainers</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,13 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>test</scope>
</dependency>
<!-- To be removed if we stop declaring hibernate validator as oldcore runtime dependency -->
<dependency>
<groupId>org.mortbay.jasper</groupId>
<artifactId>apache-el</artifactId>
<groupId>org.glassfish.expressly</groupId>
<artifactId>expressly</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
<!-- Test dependencies -->
<!-- For some tests we need to have the Servlet API JAR available -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<version>${commons.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.xwiki.commons</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@

<!-- Need servlet api for getting HttpSession id and flushing generated CAPTCHAs to HttpResponse -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.xwiki.commons</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,10 @@

<!-- Test Dependencies -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.xwiki.commons</groupId>
<artifactId>xwiki-commons-tool-test-component</artifactId>
<version>${commons.version}</version>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-test-oldcore</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -97,13 +93,6 @@
<version>${commons.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-test-oldcore</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@
<version>${commons.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
*
* @version $Id$
* @since 10.0
* @deprecated merged with {@link Response}
*/
@Deprecated(since = "42.0.0")
public interface RedirectResponse extends Response
{
/**
Expand Down
Loading

0 comments on commit 6da9ea4

Please sign in to comment.