Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] servlet-api repackaging

Hi,

I notice that Jetty repackages the jakarta (and javax) servlet api into a module jetty.servlet.api. This module is then required by modules such as org.eclipse.jetty.server.

This repackaging makes it hard (impossible?) to create a reliable configuration with modules which require jakarta.servlet. If some module sees both the standard jakarta module and Jetty's, then you'll get compilation failures like:

[ERROR] COMPILATION ERROR :
[ERROR] the unnamed module reads package jakarta.servlet from both jetty.servlet.api and jakarta.servlet

If I exclude the Jetty servlet module, I get the following error:

[ERROR] module not found: jetty.servlet.api
 
Based on my current knowledge of the Java Modules System, I'm not sure how to go about creating a reliable module configuration which includes both Jetty and 'jakarta.servlet'.

Would it be possible to rework Jetty's servlet API to depend on and require the standard API?

In my particular case, jakarta.servlet is in a parent Layer / classloader, which is seen by servlets in separate modules and by my Jetty module.

This scenario worked fine using Jetty 9.4.27.v20200227, which I'm now upgrading from.

Thanks,
Eirik.

Back to the top