From 00c2c217004f3102fa2bebdfe23d83746a3fc51c Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Thu, 15 Nov 2018 15:08:42 +0100 Subject: [PATCH 1/3] Fixed small typos and clarified JPMS usage. Signed-off-by: Simone Bordet --- .../asciidoc/administration/startup/startup-jpms.adoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jetty-documentation/src/main/asciidoc/administration/startup/startup-jpms.adoc b/jetty-documentation/src/main/asciidoc/administration/startup/startup-jpms.adoc index 075b75d9c96..ec0a8c9c13b 100644 --- a/jetty-documentation/src/main/asciidoc/administration/startup/startup-jpms.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/startup/startup-jpms.adoc @@ -19,16 +19,17 @@ [[startup-jpms]] === Startup using the Java Platform Module System (JPMS) -Jetty modules also act ass automatic https://en.wikipedia.org/wiki/Java_Platform_Module_System[JPMS] modules via the `Automatic-Module-Name` attribute in the jar's `MANIFEST.MF` file. +Jetty modules also act as automatic https://en.wikipedia.org/wiki/Java_Platform_Module_System[JPMS] modules via the `Automatic-Module-Name` attribute in the jar's `MANIFEST.MF` file. This makes possible to run Jetty from the module-path, rather than the class-path. -We recommend using JDK 11 or greater due to the fact that JDK 11 removed all the "enterprise" modules from the JDK. +We recommend using JDK 11 or greater due to the fact that JDK 11 removed all the "enterprise" modules from the JDK, +and therefore it guarantees a more stable platform to base your application's dependencies on. The classes in these "enterprise" modules were bundled with JDK 8, and present in "enterprise" modules in JDK 9 and JDK 10. With JDK 11, these "enterprise" classes are either not available in the JDK (because their corresponding module was removed), or they are present in a different module. Because some of these "enterprise" classes are required by Jetty or by applications running in Jetty, it is better to use a stable source for those classes - in this case by using JDK 11 -or greater. +or greater, and explicitly referencing the "enterprise" classes as dependencies, rather than assuming they are bundled with the JDK. [[jpms-module-path]] ==== Starting Jetty on the module-path @@ -53,7 +54,6 @@ The server then starts Jetty on the module-path using the `--jpms` option. ---- [NOTE] When running on the module-path using the `--jpms` option, the Jetty start mechanism will fork a second JVM passing it the right JVM options to run on the module-path. - You will have two JVMs running: one that runs `start.jar` and one that runs Jetty on the module-path. ---- @@ -64,7 +64,7 @@ If you are interested in the details of how the command line to run Jetty on the $ java -jar $JETTY_HOME/start.jar --jpms --dry-run .... -This will give an out put looking something like this (broken in sections for clarity): +This will give an output looking something like this (broken in sections for clarity): [source, screen, subs="{sub-order}"] .... From d095413aee4d4276337fc3e73c07d128ff4c6e14 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Thu, 15 Nov 2018 16:38:10 +0100 Subject: [PATCH 2/3] Added additional JPMS section. Signed-off-by: Simone Bordet --- .../administration/startup/startup-jpms.adoc | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/jetty-documentation/src/main/asciidoc/administration/startup/startup-jpms.adoc b/jetty-documentation/src/main/asciidoc/administration/startup/startup-jpms.adoc index ec0a8c9c13b..51f3b6b2984 100644 --- a/jetty-documentation/src/main/asciidoc/administration/startup/startup-jpms.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/startup/startup-jpms.adoc @@ -156,3 +156,37 @@ add-opens: /=(,)* add-exports: /=(,)* add-reads: =(,)* .... + +[[jpms-module-path-alternative]] +==== Alternative way to start Jetty on the module-path + +The section above uses the `--jpms` command line option to start Jetty on the module-path. +An alternative way of achieving the same result is to use a Jetty module, `$JETTY_BASE/modules/jpms.mod`, +that specifies that you want to run using JPMS (and possibly add some JPMS specific configuration). + +[source, screen, subs="{sub-order}"] +.jpms.mod +.... +[ini] +--jpms + +[jpms] +# Additional JPMS configuration. +.... + +The `[ini]` section is equivalent to passing the `--jpms` option to the command line. +The `[jpms]` section (see also the link:#jpms-advanced-config[advanced JPMS configuration section]) +allows you specify additional JPMS configuration. + +[source, screen, subs="{sub-order}"] +.... +$ mkdir jetty-base-jpms +$ cd jetty-base-jpms +$ mkdir modules +# Copy the jpms.mod file above into the $JETTY_BASE/modules/ directory. +$ cp /tmp/jpms.mod modules/ +# Add both the http and the jpms modules. +$ java -jar $JETTY_HOME/start.jar --add-to-start=http,jpms +# Jetty will start on the module-path. +$ java -jar $JETTY_HOME/start.jar +.... From 52f316e5b3222789b4eff3337fa50d538079f2e7 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 15 Nov 2018 09:47:43 -0600 Subject: [PATCH 3/3] Updating to 9.4.15-SNAPSHOT --- jetty-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-bom/pom.xml b/jetty-bom/pom.xml index 65f84c0c5a0..a34b1206a39 100644 --- a/jetty-bom/pom.xml +++ b/jetty-bom/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty 4.0.0 jetty-bom - 9.4.14-SNAPSHOT + 9.4.15-SNAPSHOT Jetty :: Bom Jetty BOM artifact http://www.eclipse.org/jetty