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
  • Loading branch information
tmortagne committed Sep 18, 2024
1 parent c92ad8a commit 28406e7
Show file tree
Hide file tree
Showing 271 changed files with 2,471 additions and 4,890 deletions.
4 changes: 0 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.113.Final</netty.version>
<hibernate.version>5.6.15.Final</hibernate.version>
<dockerJava.version>3.4.0</dockerJava.version>
Expand Down
91 changes: 87 additions & 4 deletions xwiki-platform-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,93 @@
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>
</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 @@ -66,6 +66,6 @@ public File getTemporaryDirectory()
{
// Section PLT.10.3 from the Portlet 1.0 specification says that this should be available.
// FIXME: why is this using a servlet specifications variable name ? Is that really valid for a portlet ?
return (File) this.portletContext.getAttribute("javax.servlet.context.tempdir");
return (File) this.portletContext.getAttribute("jakarta.servlet.context.tempdir");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
<xwiki.jacoco.instructionRatio>0.15</xwiki.jacoco.instructionRatio>
</properties>
<dependencies>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.xwiki.commons</groupId>
<artifactId>xwiki-commons-component-default</artifactId>
Expand Down Expand Up @@ -71,8 +75,9 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>org.xwiki.commons</groupId>
<artifactId>xwiki-commons-jakartabridge-servlet</artifactId>
<version>${commons.version}</version>
</dependency>

<!-- Test Dependencies -->
Expand Down
Loading

0 comments on commit 28406e7

Please sign in to comment.