Move to Jakarta based application servers #1075
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See xwiki/xwiki-platform#3388 for the platform side of things.
Jira URLs
Changes
Description
The idea is to do just enough for XWiki to work in jakarta based Application servers (Jetty 11+, Tomcat 10+).
Jakarta WebSocket 2.1.1
XWiki has been migrated to WebSocket 2.1.1 without any kind of bridge, so every WebSocket related APIs are broken. There was no obvious way to keep supporting WebSocket 1 but fortunately no use of those APIs were found in contrib extensions.
Jakarta Validation 3.0.2
XWiki has been migrated to Validation 3.0.2 (and Hibernate Validator 8.0.1) without any kind of bridge. A Javax Validation API JAR remain in the XWiki WAR because it's referenced by Jersey, but XWiki itself only support Jakarta Validation. In practice, it just means that Javax Validation annotations used in a contrib extension are going to be ignored. It's easy for an extension to support both Javax and Jakarta XWiki versions by declaring both Java Javax and Jakarta Validation annotations.
Jakarta Servlet 5.0
javax.servlet
<->jakarta.servlet
has been introduced.Jakarta Inject 2.0.1
It was probably not strictly required, but both javax and jakarta Inject APIs are now supported at the same time.
Not migrated
It's not strictly required to migrate everything to
jakarta.*
to work in a jakarta application server like Jetty or Tomcat (we should do it eventually of course, but we can do that in several steps):See https://design.xwiki.org/xwiki/bin/view/Proposal/Jakartamigration for more details.
TODO
Executed Tests
Expected merging strategy