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

Provide a replacement for jetty-runner #10854

Open
gregw opened this issue Nov 4, 2023 · 2 comments
Open

Provide a replacement for jetty-runner #10854

gregw opened this issue Nov 4, 2023 · 2 comments

Comments

@gregw
Copy link
Contributor

gregw commented Nov 4, 2023

Jetty version(s)
12

Enhancement Description

Having a single jar web server is a convenience that many users desire. See #1905, #4562 and #4563
We should either provide a simple one for each eeX environment or a process that can create one for a specific configuration.

@joakime
Copy link
Contributor

joakime commented Nov 5, 2023

Make jetty's start.jar include all of the libs + modules + etc inside the jar.

Then it's just a matter of start.jar --module=http,ee10-deploy http.server.port=8080 --deploy=foo.war and if they want something more complicated they can just do start.jar --module=http,ee10-deploy http.server.port=8080 --deploy=foo.xml custom-ssl.xml jdbc-jndi.xml

Call this new thing something like start-embedded.jar which has no jpms support.

Thing is, this CANNOT be deployed to maven central, as it'll just wind up being a dependency in some projects, and that will cause duplicate classes issues.
There would be no way to override servlet, or jsp, or jstl, or websocket, etc...

And i'm dubious we would even be allowed to create + deploy such a complicated beast (license wise)

@joakime
Copy link
Contributor

joakime commented Nov 5, 2023

A normal uber jar will not be a good solution for Jetty 12.
As we would have conflicting deps on things like jakarta.servlet and whatnot across the environments.

We would have to isolate each environment away from the prying eyes of Java.
Using the shader plugin and rewriting the environment dependencies (ie: servlet, jsp, jstl, etc) wouldn't help either, as the webapps wouldn't be able to use those classes then.

Moving those 3rd party environment jars into something like META-INF/jetty/environments/ee#/<groupId>/<artifactId>/<version>/ and having a unique classloader that understands this structure might work. (bonus is that the start.jar maven://<groupId>/<artifactId>/<version> syntax in the module files can still work.)

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