[ 
https://issues.apache.org/jira/browse/FELIX-6612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael H. Siemaszko updated FELIX-6612:
----------------------------------------
    Attachment: Upgrade Apache Felix to Jakarta Servlet API 6.x.20230713.pdf

Current status is reflected on the updated Mikado Graph (see attached file 
named 'Upgrade Apache Felix to Jakarta Servlet API 6.x.20230713.pdf'); 
prerequisites completed are checked off, those being finished are accordingly 
marked as well.

All latest commits are on 
{color:#000080}+[https://github.com/DataInMotion/felix-dev/tree/jakarta-servlet-6-x]+{color}
 branch.

There are no compilation issues and unit tests work as well. However, Pax Exam 
integration tests are currently failing due to pulling in old version of Jetty 
(9.4.12.v20180830, supporting `javax.servlet` only), instead of latest version 
of Jetty (11.x) which supports `jakarta.servlet`.

Regarding prerequisites:
 * Updated Mikado Graph contains current status of prerequisites; those 
completed are checked off, those being finished are accordingly marked as well.

 * As per earlier discussion with Carsten Ziegeler and compromise I offered 
(https://issues.apache.org/jira/browse/FELIX-6612?focusedCommentId=17730712&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17730712),
 I added / explicitly stated "_Upgrade Apache Felix to Jakarta Servlet API 
5.x_" as a prerequisite to "_Upgrade Apache Felix to Jakarta Servlet API 6.x_", 
and that is what's currently being worked on;

 * Additional prerequisites were also added, as it turned out those must be 
addressed for the entire upgrade to succeed; no doubt other will also come up 
and graph will be be updated then accordingly;

 

Regarding modules affected, i.e. questions number *1* and *2* of those asked 
(see issue description), to which I received no reply:

A) I dropped modules denoted as retired as per 
{color:#000080}+[https://felix.apache.org/documentation/subprojects.html#_retired_projects]+{color},
 i.e. “iPOJO”, “JAAS Support”, and “UpnP”; 

B) However, that list does not seem complete, as e.g. “System Ready” 
({color:#000080}+[https://github.com/apache/felix-dev/tree/master/systemready]+{color})
 is not on that list of retired projects, and only mentioned in README of that 
repo 
({color:#000080}+[https://github.com/apache/felix-dev/tree/master/systemready]+{color});

C) In addition, some modules had no official releases yet – it is not clear 
whether those should be dropped as well? Specifically: 
 * Should `org.apache.felix.webconsole.plugins.deppack` be worked on, 
considering it was not released yet – no release present in Maven Central 
([https://central.sonatype.com/search?q=deppack]) nor 
[https://repo1.maven.org/maven2/org/apache/felix/] ?

 * Should `org.apache.felix.webconsole.plugins.gogo` be worked on, considering 
it was not released yet – not present in Maven Central 
([https://central.sonatype.com/search?q=org.apache.felix.webconsole.plugins.gogo])
 nor [https://repo1.maven.org/maven2/org/apache/felix/] ?

 * Should `org.apache.felix.webconsole.plugins.metatype` be worked on, 
considering it was not released yet – not present in Maven Central 
([https://central.sonatype.com/search?q=org.apache.felix.webconsole.plugins.metatype])
 nor [https://repo1.maven.org/maven2/org/apache/felix/] ?

 * Should `org.apache.felix.webconsole.plugins.shell` be worked on, considering 
it was not released yet – not present in Maven Central 
([https://central.sonatype.com/search?q=org.apache.felix.webconsole.plugins.shell])
 nor [https://repo1.maven.org/maven2/org/apache/felix/] ?

Regarding other questions I asked originally (see issue description), since I 
received no reply, after discussing those with Mark Hoffmann (Data In Motion), 
as well as insight gained while working on this upgrade, following was agreed / 
is proposed – please comment, especially if you disagree with those decisions, 
so rollbacks are avoided while pull request is reviewed / merged later on:

AD *3*. Dependencies on `org.osgi.service.http` and 
`org.osgi.service.http.whiteboard` specification API were removed by migrating 
to `org.osgi.service.servlet` specification API;

AD *4*. It seems that only `org.osgi.service.servlet` metadata needs to be 
updated, as it does not have dependencies on deprecated Jakarta Servlet API 5.x 
classes and methods. Mark Hoffmann created an issue for this 
{color:#000080}+[https://github.com/osgi/osgi/issues/597]+{color}.

AD *5*. After removing dependencies on deprecated Jakarta Servlet API 5.x 
classes and methods, jakartawrappers 
(`org.apache.felix.http.base.internal.jakartawrappers`) / javaxwrappers 
(`org.apache.felix.http.base.internal.javaxwrappers`) present in 
`org.apache.felix.http.base` will be removed and it will only support Jakarta 
Servlet API. Similarly, from `org.apache.felix.http.itest` integration tests, 
tests which refer to javax.servlet will be removed 
(`org.apache.felix.http.itest.servletapi3`).

AD *6*. Having removed dependencies on deprecated Jakarta Servlet API 5.x 
classes and methods, as well as jakartawrappers / javaxwrappers present in 
`org.apache.felix.http.base`, only (non-deprecated) Jakarta Servlet API 5.x 
will be supported, which will make supporting Jakarta Servlet API 6.x in 
parallel possible (pending other Jakarta Servlet API 6.x prerequisites, see 
Mikado graph for details).

AD *7*. Support for Java Servlet API will be removed from 
`org.apache.felix.http.servlet-api` – it will only include Jakarta Servlet API 
as dependency on only export Jakarta Servlet API metadata.

AD *8*. Having upgraded to Jakarta Servlet API 5.x, without use of any 
deprecated methods, such upgraded version will be merged to `master` branch. 
Once all code is lifted to Jakarta Servlet API 5.x, without use of any 
deprecated methods, upgrading to Jakarta Servlet API 6.x is as simple as 
adjusting its metadata, in addition to prerequisites listed on the Mikado graph 
– such Jakarta Servlet API 6.x version will not be merged to `master`, but kept 
on a separate branch, i.e. `jakarta-servlet-6-x`.

> Upgrade Apache Felix to Jakarta Servlet API 6.x
> -----------------------------------------------
>
>                 Key: FELIX-6612
>                 URL: https://issues.apache.org/jira/browse/FELIX-6612
>             Project: Felix
>          Issue Type: New Feature
>          Components: Health Checks, HTTP Service, Inventory, iPOJO, JAAS, 
> System Ready, Web Console
>            Reporter: Michael H. Siemaszko
>            Priority: Major
>         Attachments: Upgrade Apache Felix to Jakarta Servlet API 
> 6.x.20230713.pdf, Upgrade Apache Felix to Jakarta Servlet API 6.x.pdf
>
>
> Goal is to upgrade all relevant Apache Felix modules, which currently are 
> using either +Jakarta Servlet API 5.x+ or J{+}ava Servlet{+}, to {+}Jakarta 
> Servlet API 6.x{+}.
> Attached Mikado graph ({color:#000080}+[https://mikadomethod.info/]+{color}) 
> has all so far identified prerequisites listed, as well as progress on path 
> to main goal – i.e. items already completed are checked off 
> ({*}{color:#57d9a3}green icon{color}{*}). Code is shared via 
> [https://github.com/DataInMotion/felix-dev/tree/jakarta-servlet-6-x] (no pull 
> request for now – please see sections ‘Questions’ and ‘Next steps’ below).
> Before starting, I asked on Apache Felix Users list 
> ({color:#000080}+[https://www.mail-archive.com/users@felix.apache.org/msg18693.html]+{color}),
>  as well as researched if there is any ongoing effort to upgrade Apache Felix 
> to Jakarta Servlet 6.x (issues / pull requests, etc.). Besides 
> {color:#000080}+https://issues.apache.org/jira/browse/FELIX-6389+{color}, 
> which resembles this effort, I did not find anything. However, that issue is 
> open since 22/02/2021 and there has been no updates since 09/01/2022, as well 
> as no code shared as part of it. If any progress was made as part of 
> {color:#000080}+https://issues.apache.org/jira/browse/FELIX-6389+{color}, 
> kindly please provide status update and perhaps these efforts can be merged.
> h1. Modules affected
> Modules with dependency on Java Servlet or Jakarta Servlet.
> h2. org.apache.felix.http
>  * org.apache.felix.http.parent
>  * org.apache.felix.http.base
>  * org.apache.felix.http.bridge
>  * org.apache.felix.http.inventoryprinter
>  * org.apache.felix.http.itest
>  * org.apache.felix.http.jetty
>  * org.apache.felix.http.proxy
>  * org.apache.felix.http.samples.whiteboard
>  * org.apache.felix.http.servlet-api
>  * org.apache.felix.http.sslfilter
>  * org.apache.felix.http.webconsoleplugin
> h2. org.apache.felix.webconsole
>  * org.apache.felix.webconsole
>  * org.apache.felix.webconsole.plugins.deppack
>  * org.apache.felix.webconsole.plugins.ds
>  * org.apache.felix.webconsole.plugins.event
>  * org.apache.felix.webconsole.plugins.gogo
>  * org.apache.felix.webconsole.plugins.memoryusage
>  * org.apache.felix.webconsole.plugins.metatype
>  * org.apache.felix.webconsole.plugins.obr
>  * org.apache.felix.webconsole.plugins.packageadmin
>  * org.apache.felix.webconsole.plugins.scriptconsole
>  * org.apache.felix.webconsole.plugins.shell
>  * org.apache.felix.webconsole.plugins.subsystems
>  * org.apache.felix.webconsole.plugins.upnp
>  * org.apache.felix.webconsole.plugins.useradmin
> h2. org.apache.felix.healthcheck
>  * org.apache.felix.healthcheck.core
>  * org.apache.felix.healthcheck.webconsoleplugin
> h2. Other
>  * org.apache.felix.jaas
>  * org.apache.felix.example.jaas.app
>  * org.apache.felix.example.jaas.jdbc-h2
>  * org.apache.felix.ipojo.webconsole
>  * org.apache.felix.systemready
>  * org.apache.felix.servicediagnostics.plugin
>  * org.apache.felix.inventory
> h1. Questions
> 1. Regarding modules affected, are there any additional modules which should 
> be taken into account?
> 2. Regarding modules affected, should any of the modules listed be dropped 
> from that list ? (e.g. some may be out of date / replaced by other already)
> 3. Do you know of any ongoing effort to migrate `org.osgi.service.http` 
> specification to Jakarta ? How otherwise should modules currently using 
> `org.osgi.service.http` specification API classes and methods be refactored ? 
> I am aware of 
> {color:#000080}+[https://github.com/eclipse-equinox/equinox/issues/183]+{color}
>  but it is not clear to me from that discussion if any such effort will be 
> actually made.
> 4. Do you know of any ongoing effort to upgrade `org.osgi.service.servlet` to 
> support Jakarta Servlet API 6.x ?
> 5. If `javax.servlet` dependency is removed from 
> `org.apache.felix.http.base`, wouldn't the wrappers become obsolete ? I.e. 
> shouldn't `org.apache.felix.http.base.internal.jakartawrappers` and 
> `org.apache.felix.http.base.internal.javaxwrappers` be dropped then and 
> Jakarta Servlet API used directly ?
> 6. Should Jakarta Servlet API 5.x be supported in parallel with Jakarta 
> Servlet API 6.x (as hinted at in 
> {color:#000080}+[https://www.mail-archive.com/users@felix.apache.org/msg18694.html]+{color}),
>  or only Jakarta Servlet API 6.x ?
> 7. Should `org.apache.felix.http.servlet-api` module be kept once dependency 
> on Java Servlet API is removed from it?
> 8. Should this be merged to `master` branch @ 
> {color:#000080}+[https://github.com/apache/felix-dev]+{color} once ready, or 
> dedicated branch should be used (e.g. `jakarta-servlet-6-x`)
> h1. Next steps
> 1. Please provide answers to questions mentioned in previous section.
> 2. If you see any of the prerequisites missing from Mikado graph, please 
> mention those.
> 3. Please create a dedicated branch @ 
> {color:#000080}+[https://github.com/apache/felix-dev]+{color} (e.g. 
> `jakarta-servlet-6-x`) unless this should be merged to `master` once ready.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to