Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/jetty-12.0.x' into jetty-12.0.…
Browse files Browse the repository at this point in the history
…x-documentation-operations-logging

* upstream/jetty-12.0.x: (83 commits)
  Fix connection pool's forcible stop (jetty#9280)
  jetty#9240 add null checks to methods that can be used on a stopped pool
  retry failing tests one more time (jetty#9274)
  suppress stack
  Jetty 12.0.x reenable jetty ee9 tests (jetty#9224)
  Jetty 12.0.x silence tests' stacktraces (jetty#9225)
  More narrowly focused DEBUG logging for JavadocTransparentProxy flaky test
  Revert "More DEBUG on CI build/test"
  More DEBUG on CI build/test
  Adding debug to failing test to see what is causing it to fail.
  Removing unused / old deps
  Remove duplicate dependency declarations.
  Jetty 12 - New HTTP Cookie interface (jetty#9205)
  Converted PathMappings to be an AbstractMap (jetty#9213)
  Removing jetty-unixsocket-* references (doesn't exist in Jetty 12)
  Bump versions.maven.plugin.version to 2.14.2
  Bump apache.directory.api.version to 2.1.2
  Bump hazelcast.version to 4.2.6
  Bump slf4j.version to 2.0.6
  Bump osgi-service-component-version to 1.5.1
  ...
  • Loading branch information
Greg Poulos committed Feb 1, 2023
2 parents c27f45c + e68c827 commit 7e21247
Show file tree
Hide file tree
Showing 1,223 changed files with 16,425 additions and 18,886 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!groovy

pipeline {
agent any
agent none
// save some io during the build
options {
skipDefaultCheckout()
Expand Down Expand Up @@ -105,7 +105,7 @@ def mavenBuild(jdk, cmdline, mvnName) {
"MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
configFileProvider(
[configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS')]) {
sh "mvn -Dmaven.repo.uri=http://10.0.0.15:8081/repository/maven-public/ -Dmaven.test.failure.ignore=true -ntp -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Pci -DexcludedGroups=\"external, large-disk-resource, stress, slow, not-on-ci, flaky\" -V -B -e -Djetty.testtracker.log=true $cmdline"
sh "mvn -Dmaven.repo.uri=http://10.0.0.15:8081/repository/maven-public/ -Dmaven.test.failure.ignore=true -ntp -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Pci -DexcludedGroups=\"external, large-disk-resource, stress, slow, not-on-ci, flaky\" -V -B -e -Djetty.testtracker.log=true -Dsurefire.rerunFailingTestsCount=1 $cmdline"
}
}
}
Expand Down
1,512 changes: 1,512 additions & 0 deletions build/build-resources/intellij-javadoc-inspection.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/build-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<groupId>org.eclipse.jetty</groupId>
<artifactId>build-resources</artifactId>
<version>12.0.0-SNAPSHOT</version>
<name>Jetty :: Build Resources</name>
<name>Build :: Resources</name>
<packaging>jar</packaging>

<properties>
Expand Down
6 changes: 6 additions & 0 deletions build/build-resources/src/main/resources/jetty-checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>

<!-- Excludes all quiche files -->
<!-- See https://checkstyle.org/config_filefilters.html -->
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="[/\\]org[/\\]eclipse[/\\]jetty[/\\]quic[/\\]quiche[/\\]"/>
</module>

<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="FileTabCharacter">
Expand Down
2 changes: 1 addition & 1 deletion build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jetty.build</groupId>
<artifactId>build</artifactId>
<name>Build :: Parent</name>
<name>Build</name>
<packaging>pom</packaging>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion documentation/jetty-asciidoctor-extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-asciidoctor-extensions</artifactId>
<name>Jetty :: Documentation :: AsciiDoctor Extensions</name>
<name>Documentation :: AsciiDoctor Extensions</name>
<packaging>jar</packaging>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion documentation/jetty-documentation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<modelVersion>4.0.0</modelVersion>
<artifactId>jetty-documentation</artifactId>
<name>Jetty :: Documentation</name>
<name>Documentation :: Guides</name>
<packaging>jar</packaging>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The replacement `logging.mod` performs a number of tasks.
. The jetty-home is unpacked (and untouched) into `/opt/jetty-home/` and becomes the `${jetty.home}` directory for this demonstration.
. The `curl` command downloads the replacement `logging.mod` and puts it into the `${jetty.base}/modules/` directory for use by mybase only.
. The `start.jar --add-to-start=logging` command performs a number of steps to make the logging module available to the `${jetty.base}` configuration.
.. The `--module=logging` command is added to the `${jetty.base}/start.ini` configuration.
.. The `--modules=logging` command is added to the `${jetty.base}/start.ini` configuration.
.. Required `${jetty.base}` directories are created: `${jetty.base}/logs` and `${jetty.base}/resources`
.. Required libraries are downloaded (if not present already): slf4j-api, slf4j-log4j, and log4j itself.
* The libraries are put in the `${jetty.base}/lib/logging/` directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The replacement `logging.mod` performs a number of tasks.
. The `curl` command downloads the replacement `logging.mod` and puts it into the `${jetty.base}/modules/` directory for use by `mybase` only.
. The `start.jar --add-to-start=logging` command performs a number of steps to make the logging module available to the `${jetty.base}`
configuration.
.. The `--module=logging` command is added to the `${jetty.base}/start.ini` configuration.
.. The `--modules=logging` command is added to the `${jetty.base}/start.ini` configuration.
.. Required `${jetty.base}` directories are created: `${jetty.base}/logs` and `${jetty.base}/resources`.
.. Required configuration files are downloaded (if not present already): `jetty-logging.properties`, and `logging.properties`
* The configuration files are put in the `${jetty.base}/resources/` directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The replacement `logging.mod` performs a number of tasks.
. The jetty-home is unpacked (and untouched) into `/opt/jetty-home/` and becomes the `${jetty.home}` directory for this demonstration.
. The `curl` command downloads the replacement `logging.mod` and puts it into the `${jetty.base}/modules/` directory for use by `mybase` only.
. The `start.jar --add-to-start=logging` command performs a number of steps to make the logging module available to the `${jetty.base}` configuration.
.. The `--module=logging` command is added to the `${jetty.base}/start.ini` configuration.
.. The `--modules=logging` command is added to the `${jetty.base}/start.ini` configuration.
.. Required `${jetty.base}` directories are created: `${jetty.base}/logs` and `${jetty.base}/resources`.
.. Required libraries are downloaded (if not present already): slf4j-api, and slf4j-jdk14.
* The libraries are put in the `${jetty.base}/lib/logging/` directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The replacement `logging.mod` performs a number of tasks.
. The jetty-home is unpacked (and untouched) into `/opt/jetty-home/` and becomes the `${jetty.home}` directory for this demonstration.
. The `curl` command downloads the replacement `logging.mod` and puts it into the `${jetty.base}/modules/` directory for use by `mybase` only.
. The `start.jar --add-to-start=logging` command performs a number of steps to make the logging module available to the `${jetty.base}` configuration.
.. The `--module=logging` command is added to the `${jetty.base}/start.ini` configuration.
.. The `--modules=logging` command is added to the `${jetty.base}/start.ini` configuration.
.. Required `${jetty.base}` directories are created: `${jetty.base}/logs` and `${jetty.base}/resources`.
.. Required libraries are downloaded (if not present already) to the `${jetty.base}/lib/logging/` directory: slf4j-api, logback-core, and logback-classic.
.. Required configuration files are downloaded (if not present already) to the `${jetty.base}/lib/resources/` directory.: `jetty-logging.properties`, and `logback.xml`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ For SSL, parameters are now properties in the `start.ini` or `start.d\ssl.ini`,

Instead of explicitly listing all the libraries, properties, and XML files for a feature, Jetty 9.1 introduced a new module system.
A module is defined in a `modules/*.mod` file, including the libraries, dependencies, XML, and template INI files for a Jetty feature.
Thus you can use a single `--module=name` command line option as the equivalent of specifying many `--lib=location, feature.xml, name=value` arguments for a feature and all its dependencies.
Thus you can use a single `--modules=name` command line option as the equivalent of specifying many `--libs=location, feature.xml, name=value` arguments for a feature and all its dependencies.
Modules use their dependencies to control the ordering of libraries and XML files.
For more information, see xref:startup-modules[].

Expand Down Expand Up @@ -205,7 +205,7 @@ Jetty Server Classpath:
-----------------------
Version Information on 11 entries in the classpath.
: order presented here is how they would appear on the classpath.
changes to the --module=name command line options will be reflected here.
changes to the --modules=name command line options will be reflected here.
0: 4.0.2 | ${jetty.home}/lib/jetty-jakarta-servlet-api-4.0.2.jar
2: {VERSION} | ${jetty.home}/lib/jetty-http-{VERSION}.jar
3: {VERSION} | ${jetty.home}/lib/jetty-continuation-{VERSION}.jar
Expand Down Expand Up @@ -251,7 +251,7 @@ First notice the separation of `${jetty.base}` and `${jetty.home}`.
[[modules]]
===== Modules

Notice that you have `--module=<name>` here and there; you have wrapped up the goal of a module (libs, configuration XMLs, and properties) into a single unit, with dependencies on other modules.
Notice that you have `--modules=<name>` here and there; you have wrapped up the goal of a module (libs, configuration XMLs, and properties) into a single unit, with dependencies on other modules.

You can see the list of modules:

Expand Down Expand Up @@ -446,7 +446,7 @@ If you want to start using a new module:
[my-base] $ java -jar ../jetty-home-{VERSION}/start.jar --add-to-start=https
....

This adds the `--module=` lines and associated properties (the parameterized values mentioned above), to your `start.ini`.
This adds the `--modules=` lines and associated properties (the parameterized values mentioned above), to your `start.ini`.

____
[IMPORTANT]
Expand Down Expand Up @@ -494,7 +494,7 @@ For SSL they include `modules/http.mod`, `modules/https.mod`, `modules/ssl.mod`,
+
Ideally, this level of detail is not important to you.
What is important is that you want to use HTTPS and want to configure it.
You accomplish that by adding the `--module=https` to your `start.ini`.
You accomplish that by adding the `--modules=https` to your `start.ini`.
By default, the module system keeps things sane, and transitively includes all dependent modules as well.

You can see what the configuration looks like, after all of the modules are resolved, without starting Jetty via:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// Asciidoctor IDE configuration file.
// See https://github.com/asciidoctor/asciidoctor-intellij-plugin/wiki/Support-project-specific-configurations
:ee-all: ee{8,9,10}
:ee-current: ee10
:ee-current-caps: EE10
:experimental:
:imagesdir: images
:jetty-home: ../../../../../../../jetty-home/target/jetty-home
Original file line number Diff line number Diff line change
Expand Up @@ -46,46 +46,47 @@ mywebapp.war
<5> `WEB-INF/web.xml` is the web application deployment descriptor, which defines the components and the configuration of your web application.
====

To deploy a standard web application, you need to enable the xref:og-module-deploy[`deploy` module]:
To deploy a standard web application, you need to enable the xref:og-module-eeN-deploy[`{ee-current}-deploy` module].

NOTE: The following examples assume you're deploying a Jakarta {ee-current-caps} application; for other versions of Jakarta EE, make sure to activate the corresponding `{ee-all}-deploy` module.

[subs=attributes]
----
$ java -jar $JETTY_HOME/start.jar --add-module=deploy
$ java -jar $JETTY_HOME/start.jar --add-module={ee-current}-deploy
----

[source,options=nowrap]
----
include::jetty[setupArgs="--add-module=http",args="--add-module=deploy"]
include::jetty[setupArgs="--add-module=http",args="--add-module={ee-current}-deploy"]
----

The `deploy` module creates `$JETTY_BASE/webapps`, which is the directory where Jetty looks for any `+*.war+` files or web application directories to deploy.
The `{ee-current}-deploy` module creates `$JETTY_BASE/webapps`, which is the directory where Jetty looks for any `+*.war+` files or web application directories to deploy.

[NOTE]
====
Activating Jetty's `deploy` module enables web application deployment.
Activating one of Jetty's `{ee-all}-deploy` modules enables web application deployment.
Whether these web applications are served via clear-text HTTP/1.1, or secure HTTP/1.1, or secure HTTP/2, or HTTP/3 (or even all of these protocols) depends on if the correspondent Jetty modules have been enabled.
Refer to the xref:og-protocols[section about protocols] for further information.
====

Now you're ready to copy a web application to the `$JETTY_BASE/webapps` directory.
You can use one of the demos shipped with Jetty:

[subs=attributes]
----
$ java -jar $JETTY_HOME/start.jar --add-module=ee10-demo-simple
$ java -jar $JETTY_HOME/start.jar --add-module={ee-current}-demo-simple
----

The `$JETTY_BASE` directory is now:

[subs=attributes]
----
$JETTY_BASE
├── resources
│ └── jetty-logging.properties
├── start.d
│ ├── deploy.ini
│ ├── ee10-demo-simple.ini
│ ├── {ee-current}-demo-simple.ini
│ └── http.ini
└── webapps
└── ee10-demo-simple.war
└── {ee-current}-demo-simple.war
----

Now start Jetty:
Expand All @@ -96,12 +97,12 @@ $ java -jar $JETTY_HOME/start.jar

[source,subs=quotes,options=nowrap]
----
include::jetty[setupArgs="--add-modules=http,deploy,ee10-demo-simple",highlight="WebAppContext"]
include::jetty[setupArgs="--add-modules=http,deploy,{ee-current}-demo-simple",highlight="WebAppContext"]
----

Note the highlighted line that logs the deployment of `ee10-demo-simple.war`.
Note the highlighted line that logs the deployment of `{ee-current}-demo-simple.war`.

Now you can access the web application by pointing your browser to `+http://localhost:8080/ee10-demo-simple+`.
Now you can access the web application by pointing your browser to `pass:a[http://localhost:8080/{ee-current}-demo-simple]`.

[[og-begin-deploy-war-advanced]]
===== Advanced Deployment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

Most of the times you want to be able to customize the deployment of your web applications, for example by changing the `contextPath`, or by adding JNDI entries, or by configuring virtual hosts, etc.

The customization is performed by the xref:og-module-deploy[`deploy` module] by processing xref:og-deploy-jetty[Jetty context XML files].
The customization is performed by the xref:og-module-eeN-deploy[`{ee-all}-deploy` module] by processing xref:og-deploy-jetty[Jetty context XML files].

The `deploy` module contains the `DeploymentManager` component that scans the `$JETTY_BASE/webapps` directory for changes, following the deployment rules described in xref:og-deploy-rules[this section].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ own custom link:https://docs.oracle.com/javase/7/docs/api/javax/security/auth/sp
[[og-jaas-module]]
===== The `jaas` module

Enable the `ee{8,9,10}-jaas` module appropriate for your EE platform:
Enable the `{ee-all}-jaas` module appropriate for your EE platform:

[subs=attributes]
----
include::{jetty-home}/modules/ee10-jaas.mod[]
include::{jetty-home}/modules/{ee-current}-jaas.mod[]
----

The configurable items in the resulting `$jetty.base/start.d/jaas.ini` file are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,29 @@ Only modules conforming to the "Servlet Container Profile" with the ServerAuthMo
Enable the `jaspi` module:

----
include::{jetty-home}/modules/ee10-jaspi.mod[]
include::{jetty-home}/modules/{ee-current}-jaspi.mod[]
----

[[og-jaspi-xml]]
===== Configure JASPI

Activate the `ee{9,10}-jaspi` module that matches your EE platform version.
Activate either the `ee9-jaspi` or `{ee-current}-jaspi` module, whichever matches your EE platform version.

[subs=attributes]
----
$ java -jar $JETTY_HOME/start.jar --add-modules=ee10-jaspi
$ java -jar $JETTY_HOME/start.jar --add-modules={ee-current}-jaspi
----

You can then register a `AuthConfigProvider` onto the static `AuthConfigFactory` obtained with `AuthConfigFactory.getFactory()`. This registration can be done in the XML configuration file which will be copied to `$JETTY_BASE/etc/jaspi/jaspi-authmoduleconfig.xml` when the module is enabled.

====== JASPI Demo
The `ee9-jaspi-demo` and `ee10-jaspi-demo` modules illustrate setting up HTTP Basic Authentication using the EE9 and EE10 Jakarta Authentication modules that come packaged with Jetty.
The `ee9-jaspi-demo` and `{ee-current}-jaspi-demo` modules illustrate setting up HTTP Basic Authentication using the EE9 and {ee-current-caps} Jakarta Authentication modules that come packaged with Jetty.

The following example uses Jetty's EE10 implementation of `AuthConfigProvider` to register a `ServerAuthModule` directly.
The following example uses Jetty's {ee-current-caps} implementation of `AuthConfigProvider` to register a `ServerAuthModule` directly.

[source, xml]
[source,xml]
----
include::{jetty-home}/etc/jaspi/jetty-ee10-jaspi-demo.xml[]
include::{jetty-home}/etc/jaspi/jetty-{ee-current}-jaspi-demo.xml[]
----

Other custom or 3rd party modules that are compatible with the `ServerAuthModule` interface in JASPI can be registered in the same way.
Expand All @@ -63,8 +64,8 @@ The `CallerPrincipalCallback` and `GroupPrincipalCallback` do not require use of

Jetty provides an implementation of the `AuthConfigFactory` interface which is used to register `AuthConfigProviders`. This can be replaced by a custom implementation by adding a custom module which provides `auth-config-factory`.
This custom module must reference an XML file which sets a new instance of the `AuthConfigFactory` with the static method `AuthConfigFactory.setFactory()`.
For an example of this see the `ee{9,10}-jaspi-default-auth-config-factory` module, which provides the default implementation used by Jetty.
For an example of this see the `{ee-current}-jaspi-default-auth-config-factory` module, which provides the default implementation used by Jetty.

----
include::{jetty-home}/modules/ee10-jaspi-default-auth-config-factory.mod[]
include::{jetty-home}/modules/{ee-current}-jaspi-default-auth-config-factory.mod[]
----
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[[og-jmx-local]]
==== Enabling Local JMX Support

As with many other Jetty features, local JMX support is enabled with the `jmx` Jetty module:
As with many other Jetty features, local JMX support is enabled with the xref:og-module-jmx[`jmx` Jetty module]:

----
$ java -jar $JETTY_HOME/start.jar --add-module=jmx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
[[og-jsp]]
=== Java Server Pages

Jetty supports JSP via the `ee{8,9,10}-jsp` modules, which are based on Apache Jasper:
Jetty supports JSP via the `{ee-all}-jsp` modules, which are based on Apache Jasper:

[subs=attributes]
----
include::{jetty-home}/modules/ee10-jsp.mod[]
include::{jetty-home}/modules/{ee-current}-jsp.mod[]
----

Logging has been bridged to Jetty logging, so you can enable logging for the `org.apache.jasper` package, subpackages and classes as usual.
Expand Down Expand Up @@ -172,10 +173,11 @@ If the value you set doesn't take effect, try using all lower case instead of ca

=== JavaServer Pages Standard Tag Libraries

The JavaServer Pages Standard Tag Library (JSTL) is part of the Jetty distribution, and is available via the `ee{8,9,10}-jstl` modules:
The JavaServer Pages Standard Tag Library (JSTL) is part of the Jetty distribution, and is available via the `{ee-all}-jstl` modules:

[subs=attributes]
----
include::{jetty-home}/modules/ee10-jstl.mod[]
include::{jetty-home}/modules/{ee-current}-jstl.mod[]
----

When enabled, Jetty will make the JSTL tags available for your webapps.
Expand Down
Loading

0 comments on commit 7e21247

Please sign in to comment.