Hi,
I think we can start discussing the changes. I created a potential PR
for Sling API:
https://github.com/apache/sling-org-apache-sling-api/pull/55
I added a brief section to the README for updating/migrating.
If you think something is missing or needs to be done differently, don't
hesitate to directly change it in the branch or bring it up for discussion.
I created some additional PRs for other modules, but I think we should
first have the API done. But don't let this stop you from looking at the
other modules/PRs. At least some of those modules need some work to get
the PAX Exam based tests working again.
I linked all the work as sub tasks to
https://issues.apache.org/jira/browse/SLING-10000
Thanks
Carsten
On 06.01.2025 09:44, Carsten Ziegeler wrote:
Happy New Year!
In the last days I worked a little bit on a prototype to fully support
Jakarta Servlet API for Sling. As discussed in the "[RT] Path to Jakarta
Servlet Specification" I switched to a different approach which
basically adds support for Jakarta Servlet next to Javax Servlet by
adding new methods and interfaces to our API.
I have the core now up and running and at least sling-mini (in our
whiteboard) seems to work. This should cover all functionality except
script support. While you can register servlets and filters based on the
Jakarta Servlet API, any script language support is still based on
Servlet 3.
But I think this is good enough to see that this approach is feasible
and we can decide whether we want to go this route.
We also need to decide which Jakarta Servlet version we want to target.
So far I selected version 6 which is the latest version currently
implemented by Eclipse Jetty. This brings Sling as much up to date as
possible, but comes with the requirement to run latest Eclipse Jetty 12
which requires Java 17. Its probably time to make this switch.
The other option is to go with Jakarta Servlet 5 but that means we make
an update to base Sling on older versions. Doesn't feel right.
For the work I created a branch named "jakarta-2" in Sling API, Auth
Core, Engine, Resourceresolver, Servlets Resolver and Scripting Core.
PAX Exam Tests stopped working due to the Java 17 requirement and I got
lost in what is needed to make this work again.
Apart from getting the whole script machinery updated, we should work on
removing the dependency to commons fileupload (https://
issues.apache.org/jira/browse/SLING-12497) and improve the javadocs.
While everything right now compiles and deploys, I cant guarantee that
everything is still working as expected :)
Regards
Carsten
--
Carsten Ziegeler
Adobe
[email protected]