Skip to content

Migrate to Jakarta EE 10 / Jetty 12 / Jersey 3.x / Karaf 4.5#5479

Draft
holgerfriedrich wants to merge 1 commit intoopenhab:mainfrom
holgerfriedrich:k450
Draft

Migrate to Jakarta EE 10 / Jetty 12 / Jersey 3.x / Karaf 4.5#5479
holgerfriedrich wants to merge 1 commit intoopenhab:mainfrom
holgerfriedrich:k450

Conversation

@holgerfriedrich
Copy link
Copy Markdown
Member

Servlet / HTTP:

  • Migrate all servlet imports to jakarta.servlet.*
  • Upgrade Jetty 9.4.x → 12.0.23 (ee10 modules)
  • Upgrade Pax Web 8.0.x → 11.0.1
  • Replace org.apache.felix.http.servlet-api with jakarta.servlet-api 6.1.0

JAX-RS:

  • Replace Apache Aries JAX-RS Whiteboard + CXF with Eclipse OSGi Tech REST backed by Jersey 3.1.3
  • Switch osgi.service.jaxrs to osgi.service.jakartars (OSGi R8)
  • Update all itest bndrun -runbundles accordingly

JAXB:

  • Migrate maven-jaxb2-plugin → org.jvnet.jaxb:jaxb-maven-plugin 3.0.2
  • Upgrade jakarta.xml.bind-api 2.3.3 → 3.0.0 (jakarta namespace)
  • Replace org.glassfish.jaxb:jaxb-osgi with com.sun.xml.bind:jaxb-osgi 3.0.2
  • Update .xjb binding files and XSD to JAXB 3 namespace
  • Add openhab.tp-jaxb as dependency to openhab-core-base feature

Karaf:

  • Upgrade karaf.compile.version and karaf.tooling.version to 4.5.0

Dependencies:

  • Pin org.glassfish.hk2:osgi-resource-locator to 1.0.3 in bom/runtime to match feature.xml; Jersey 3.x requires this version range
  • jupnp upgrade to jakarta, not yet available

Servlet / HTTP:
- Migrate all servlet imports to jakarta.servlet.*
- Upgrade Jetty 9.4.x → 12.0.23 (ee10 modules)
- Upgrade Pax Web 8.0.x → 11.0.1
- Replace org.apache.felix.http.servlet-api with jakarta.servlet-api 6.1.0

JAX-RS:
- Replace Apache Aries JAX-RS Whiteboard + CXF with
  Eclipse OSGi Tech REST backed by Jersey 3.1.3
- Switch osgi.service.jaxrs to osgi.service.jakartars (OSGi R8)
- Update all itest bndrun -runbundles accordingly

JAXB:
- Migrate maven-jaxb2-plugin → org.jvnet.jaxb:jaxb-maven-plugin 3.0.2
- Upgrade jakarta.xml.bind-api 2.3.3 → 3.0.0 (jakarta namespace)
- Replace org.glassfish.jaxb:jaxb-osgi with com.sun.xml.bind:jaxb-osgi 3.0.2
- Update .xjb binding files and XSD to JAXB 3 namespace
- Add openhab.tp-jaxb as dependency to openhab-core-base feature

Karaf:
- Upgrade karaf.compile.version and karaf.tooling.version to 4.5.0

Dependencies:
- Pin org.glassfish.hk2:osgi-resource-locator to 1.0.3 in bom/runtime
  to match feature.xml; Jersey 3.x requires this version range
- jupnp upgrade to jakarta, not yet available

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
@holgerfriedrich
Copy link
Copy Markdown
Member Author

holgerfriedrich commented Apr 7, 2026

This is a first try to move to the (not yet released) Karaf 4.5.0 based on Jetty 12 and Jakarta 🎉
The biggest hurdle seemed to be to find a replacement for our aries rs whiteboard, which I could not get to compile with all the Jakarta packages.

I don't know if all the package migrations I had to complete in this PR are the best choice, but I got all the tests and itests green 🥳

I did not manage yet to get a running system and I am not sure what is missing to get there.

If you want to reproduce, you need two build two dependencies:

@holgerfriedrich
Copy link
Copy Markdown
Member Author

Far from working, but the runtime now starts, see this nice excerpt from bundle list:

112 │ Active   │  30 │ 12.0.23                 │ EE10 :: Websocket :: Jetty Server
131 │ Active   │  30 │ 12.0.23                 │ Core :: Websocket :: Jetty API
132 │ Active   │  30 │ 12.0.23                 │ Core :: Websocket :: Jetty Client
133 │ Active   │  30 │ 12.0.23                 │ Core :: Websocket :: Jetty Common
249 │ Active   │  30 │ 11.0.1                  │ OPS4J Pax Web - Jetty

@holgerfriedrich holgerfriedrich changed the title Migrate to Jakarta EE 10 / Jetty 12 / Jersey 3.x / Karaf 4. Migrate to Jakarta EE 10 / Jetty 12 / Jersey 3.x / Karaf 4.5 Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant