Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support newer Jetty versions #204

Open
wborn opened this issue Jan 29, 2024 · 4 comments
Open

Support newer Jetty versions #204

wborn opened this issue Jan 29, 2024 · 4 comments

Comments

@wborn
Copy link
Member

wborn commented Jan 29, 2024

Jetty 9.4 is EOL so it would be nice if newer Jetty versions are also supported.

There is a whole range of Jetty options nowadays (see the Jetty project page):

Jetty Version Servlet namespace(s) Java Version Pax Web Version Karaf Version
12.0.x javax.servlet, jakarta.servlet 17+ 10.0.x (WIP) -
11.0.x jakarta.servlet 11+ - -
10.0.x javax.servlet 11+ 9.0.x -
9.4.x javax.servlet 8 8.0.x 4.4.x

Ideally jUPnP would also support Jetty 12 but that also requires Java 17.

The OSGi world is also lagging and haven't made the switch to the Jakarta namespace yet. Pax Web 8 uses Jetty 9.4 and Pax Web 9 supports Jetty 10. Pax Web 10 using Jetty 12 is still WIP, see ops4j/org.ops4j.pax.web#1802. Apache Karaf is still using Pax Web 8.

It might be an idea to split off the Jetty transport into its own module. That way multiple transports for different Jetty versions can be added. Each module can then also properly define its dependencies which would also prevent issues like #157 while still not having any implementation dependencies in the Core module.

@kaikreuzer
Copy link
Member

It's a pity that the OSGi world is lagging behind so much and Karaf specifically. 😲
I am not so sure, though, how many jUPnP users there are that are using Jetty and no OSGi; I haven't really seen requests for newer versions, so while the idea of multiple transports might be nice, the effort might not be worth it.

I wonder if the non-OSGi way of using jUPnP shouldn't rather be the Java HttpClient, which came with Java 11. This would imho be the most natural way to do HTTP, don't you think?

@wborn
Copy link
Member Author

wborn commented Feb 2, 2024

Using the Java HttpClient may certainly be an option now that the code can use Java 11. However there are also a few Servlets being used. It doesn't look like the Simple Web Server introduced in Java 18 supports Servlets.

It is also possible to use a different Jetty version or some other implementation by using your own UpnpServiceConfiguration implementation.

@kaikreuzer
Copy link
Member

Ok, you're right. Then I would assume that we stick to Jetty 9.4.x for now for the 3.0.0 release, right?
We can leave this issue open for anybody to comment, if there is interest in support for newer Jetty versions. If not, we will simply keep it in sync what is supported by Karaf.

@wborn
Copy link
Member Author

wborn commented Feb 7, 2024

Then I would assume that we stick to Jetty 9.4.x for now for the 3.0.0 release, right?

Yes let's stick with it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants