jetty.project icon indicating copy to clipboard operation
jetty.project copied to clipboard

Discuss replacement for jetty-runner

Open janbartel opened this issue 7 months ago • 1 comments

jetty-12

As jetty-runner is @deprecated in jetty-12 for several reasons - the new environment structure for one - we should discuss what, if anything, we can do to replace it.

One suggestion: create a maven archetype to make it easier to create an embedded jetty that runs a war.

Other suggestions welcome.

janbartel avatar May 01 '25 05:05 janbartel

Would it be possible to use --dry-run and a shell script to achieve the same?

We add jetty-runner.sh and use it in this way:

$ jetty-runner.sh [static|core|ee8|...|ee11] webapp.war

Internally, jetty-runner.sh would produce via --dry-run a command line that it then runs immediately.

jetty-runner options such as --path (for the context path) could just be the normal module properties, e.g. jetty.deploy.contextPath=/ctx, so:

$ jetty-runner.sh [static|core|ee8|...|ee11] webapp.war jetty.deploy.contextPath=/ctx

This would minimize the translation of command line options between jetty-runner.sh and the normal Jetty start mechanism, but I recognize using the full format (jetty.deploy.contextPath) is a mouthful with respect to a jetty-runner.sh specific command line option (e.g. --contextPath).

sbordet avatar May 04 '25 13:05 sbordet