Issue #5254 List/Show modules (#5257)

* Issue #5254 List/Show modules

 * simplified --list-modules output
 * added --show-module

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* improve module descriptions

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2020-09-14 18:07:16 +02:00 committed by GitHub
parent b5aa128a36
commit 780e1207c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
97 changed files with 320 additions and 243 deletions

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables use of the apache implementation of JSP
Enables use of the apache implementation of JSP.
[lib]
lib/apache-jsp/*.jar

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables the apache version of JSTL
Enables the apache version of JSTL for all webapps.
[lib]
lib/apache-jstl/*.jar

View File

@ -3,6 +3,11 @@
[description]
Enables the ALPN (Application Layer Protocol Negotiation) TLS extension.
[tag]
connector
ssl
internal
[depend]
ssl
alpn-impl/alpn-${java.version.platform}

View File

@ -1,9 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Configures Jetty to use the "CdiDecoratingListener" as the default
CDI integration mode that allows a webapp to register it's own CDI
decorator.
Configures Jetty to use the "CdiDecoratingListener" as the default CDI mode.
This mode that allows a webapp to register it's own CDI decorator.
[tag]
cdi

View File

@ -1,8 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Configures Jetty to use the "CdiSpiDecorator" that calls the CDI SPI
as the default CDI integration mode.
Configures Jetty to use the "CdiSpiDecorator" as the default CDI mode.
This mode uses the CDI SPI to integrate an arbitrary CDI implementation.
[tag]
cdi

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Support for CDI inside the webapp.
Integration of CDI within webapp to Jetty container object lifecycles.
This module does not provide CDI, but configures jetty to support various
integration modes with a CDI implementation on the webapp classpath.
CDI integration modes can be selected per webapp with the "org.eclipse.jetty.cdi"

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables Deployer to apply common configuration to all webapp deployments
Enables Deployer to apply common configuration to all webapp deployments.
[depend]
deploy

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables GCloud Datastore API and implementation
Enables GCloud Datastore API and implementation.
[tags]
3rdparty

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Control GCloud API classpath
Control GCloud API classpath.
[tags]
3rdparty

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables session data store in an embedded Hazelcast Map
Enables session data store in an embedded Hazelcast Map.
[tags]
session

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables session data store in a remote Hazelcast Map
Enables session data store in a remote Hazelcast Map.
[tags]
session

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Installs the Conscrypt JSSE provider
Installs the Conscrypt JSSE provider.
[tags]
3rdparty

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Deploys the JAMon webapplication
Deploys the JAMon webapplication.
[tags]
3rdparty

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Deploys the Jminix JMX Console within the server
Deploys the Jminix JMX Console within the server.
[tags]
3rdparty

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables JSTL for all webapplications deployed on the server
Enables JSTL for all webapplications deployed on the server.
[depend]
jsp

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Capture jakarta-commons-logging events and bridge them to org.slf4j
Capture jakarta-commons-logging events and bridge them to SLF4J.
[tags]
logging

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Configure jetty logging mechanism.
Base configuration for the jetty logging mechanism.
Provides a ${jetty.base}/resources/jetty-logging.properties.
[tags]

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Capture java.util.logging events and bridge them to org.slf4j
Capture java.util.logging events and bridge them to slf4j.
[tags]
logging

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Configure jetty logging to use Java Util Logging (jul)
Configure jetty logging to use Java Util Logging (jul).
SLF4J is used as the core logging mechanism.
[tags]

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Capture Apache log4j events and bridge them to org.slf4j
Capture Apache log4j events and bridge them to SLF4J.
[tags]
logging

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Configure jetty logging to use Log4j Logging
Configure jetty logging to use Log4j.
SLF4J is used as the core logging mechanism.
[tags]

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Configure jetty logging to use log4j version 2
Configure jetty logging to use log4j version 2.
SLF4J is used as the core logging mechanism.
[tags]

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Configure logging to use SLF4J No-Op Implementation
Configure logging to use SLF4J No-Op Implementation.
[tags]
logging

View File

@ -1,8 +1,9 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Configure logging to use slf4j with no impl
(If you don't select an impl, then NOP will be used by slf4j)
Configure logging to use SLF4J.
A specific implementation of SLF4J is not enabled.
If one is not selected then NOP implementation will be used.
[tags]
logging

View File

@ -1,8 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables the unix setUID configuration so that the server
may be started as root to open privileged ports/files before
Enables the unix setUID configuration.
The server may be started as root to open privileged ports/files before
changing to a restricted user (eg jetty).
[depend]

View File

@ -1,7 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
This module causes jetty to stop immediately after starting. This is good for testing configuration and/or precompiling quickstart webapps
This module causes jetty to stop immediately after starting.
This is good for testing configuration and/or precompiling quickstart webapps
[xml]
etc/jetty-stop.xml

View File

@ -1,8 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables HTTP2 protocol support on the TLS(SSL) Connector,
using the ALPN extension to select which protocol to use.
Enables HTTP2 protocol support on the TLS(SSL) Connector with ALPN.
Uses the ALPN extension to select which protocol to use.
[tags]
connector

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables the HTTP2C protocol on the HTTP Connector
Enables the HTTP2C protocol on the HTTP Connector.
The connector will accept both HTTP/1 and HTTP/2 connections.
[tags]

View File

@ -1,8 +1,9 @@
[description]
Common to all infinispan modules
Common to all infinispan modules.
[tags]
session
internal
[depend]
sessions

View File

@ -1,5 +1,5 @@
[description]
Enables querying with the Infinispan cache
Enables querying with the Infinispan session cache.
[tags]
session

View File

@ -1,5 +1,5 @@
[description]
The Infinispan query libraries
The Infinispan query libraries.
[tags]
3rdparty

View File

@ -1,5 +1,5 @@
[description]
Setup infinispan embedded without querying
Setup infinispan embedded without querying.
[tags]
session

View File

@ -1,5 +1,5 @@
[description]
Enables session data store in a local Infinispan cache
Enables session data store in a local Infinispan cache.
[tags]
session

View File

@ -1,9 +1,10 @@
[description]
The Infinispan embedded libraries
The Infinispan embedded libraries.
[tags]
3rdparty
infinispan
internal
[depends]
sessions/infinispan/embedded/infinispan-embedded-serverclasses

View File

@ -5,6 +5,7 @@ Hides Infinispan classes from webapp.
session
3rdparty
infinispan
internal
[ini]

View File

@ -1,5 +1,5 @@
[description]
Enables querying with a remote Infinispan cache
Enables querying with a remote Infinispan cache.
[tags]
session

View File

@ -1,9 +1,10 @@
[description]
The Infinispan remote query libraries
The Infinispan remote query libraries.
[tags]
3rdparty
infinispan
internal
[license]
Infinispan is an open source project hosted on Github and released under the Apache 2.0 license.

View File

@ -1,5 +1,5 @@
[description]
Default setup for the remote infinispan cache without queries
Default setup for the remote infinispan cache without queries.
[tags]
session

View File

@ -1,5 +1,5 @@
[description]
Enables session data store in a remote Infinispan cache
Enables session data store in a remote Infinispan cache.
[tags]
session

View File

@ -1,9 +1,10 @@
[description]
The Infinispan remote libs
The Infinispan remote libs.
[tags]
3rdparty
infinispan
internal
[depends]
sessions/infinispan/remote/infinispan-remote-serverclasses

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables remote RMI access to JMX
Enables remote RMI access to JMX.
[depend]
jmx

View File

@ -1,8 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables JMX instrumentation for server beans and
enables JMX agent.
Enables JMX instrumentation for server beans and enables JMX agent.
[depend]
server

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables an unassembled maven webapp to run in a jetty distro
Enables an unassembled maven webapp to run in a jetty distro.
[depends]
server

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Memcache cache for SessionData
Memcache cache for SessionData.
[tags]
session

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Server/port address connections for session storage
Server/port connections for Mongo session storage.
[xml]
etc/sessions/mongo/session-store-by-address.xml

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
MongoURI connections for session storage
MongoURI connections for Mongo session storage
[xml]
etc/sessions/mongo/session-store-by-uri.xml

View File

@ -1,6 +1,5 @@
[description]
Enables resource injection and other servlet 3.x
features not supported in the core jetty webapps module.
Enables Servlet 3.1 resource injection.
[depend]
server

View File

@ -1,8 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enable the Jetty Proxy, that allows the server to act
as a non-transparent proxy for browsers.
Enable the Jetty Proxy.
Allows the server to act as a non-transparent proxy for browsers.
[depend]
servlet

View File

@ -1,8 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables the Jetty Quickstart module for rapid
deployment of preconfigured webapplications.
Enables the Jetty Quickstart module for rapid deployment of preconfigured webapplications.
[depend]
server

View File

@ -1,8 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Add a rule to the rewrite module to compact paths so that double slashes
in the path are treated as a single slash.
Add a rule to the rewrite module to compact paths.
Double slashes in the path are treated as a single slash.
[depends]
rewrite

View File

@ -1,8 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables a rewrite Rules container as a request customizer on
the servers default HttpConfiguration instance
Enables a rewrite Rules container as a request customizer.
Enabled on the servers default HttpConfiguration instance
[provides]
rewrite

View File

@ -1,8 +1,11 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables the jetty-rewrite handler. Specific rewrite
rules must be added to either to etc/jetty-rewrite.xml or a custom xml/module
Enables the jetty-rewrite handler.
Specific rewrite rules must be added to either to etc/jetty-rewrite.xml or a custom xml/module
[tags]
server
[provides]
rewrite|default

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enable a server wide accept rate limit
Enable a server wide accept rate limit.
[tags]
connector

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enable a server wide connection limit
Enable a server wide connection limit.
[tags]
connector

View File

@ -1,10 +1,11 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Deprecated name for requestlog using custom request logger
Deprecated name for requestlog using custom request logger.
[tags]
requestlog
internal
[depends]
requestlog

View File

@ -1,11 +1,12 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables the DebugListener to generate additional
logging regarding detailed request handling events.
Enables the DebugListener.
Generates additional logging regarding detailed request handling events.
Renames threads to include request URI.
[tags]
server
debug
[depend]

View File

@ -5,7 +5,9 @@ Deprecated Debug Log using the DebugHandle.
Replaced with the debug module.
[tags]
server
debug
internal
[depend]
server

View File

@ -1,8 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Adds all jar files discovered in $JETTY_HOME/lib/ext
and $JETTY_BASE/lib/ext to the servers classpath.
Adds jar from $JETTY_HOME/lib/ext and $JETTY_BASE/lib/ext to the servers classpath.
[tags]
classpath

View File

@ -1,4 +1,5 @@
# Enables Java Mission Control's Flight Recorder for low overhead profiling.
[description]
Enables Java Mission Control's Flight Recorder for low overhead profiling.
[depend]
server

View File

@ -5,6 +5,7 @@ Enable GzipHandler for dynamic gzip compression for the entire server.
If MSIE prior to version 7 are to be handled, also enable the msie module.
[tags]
server
handler
[depend]

View File

@ -1,8 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Generates a warning that server has been run from $JETTY_HOME
rather than from a $JETTY_BASE.
Generates a warning that server has been run from $JETTY_HOME rather than from a $JETTY_BASE.
[xml]
etc/home-base-warning.xml

View File

@ -1,8 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Adds a forwarded request customizer to the HTTP Connector
to process forwarded-for style headers from a proxy.
Adds a forwarded request customizer to the HTTP Connector.
Processes forwarded-for style headers from a proxy.
[tags]
connector

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Adds HTTPS protocol support to the TLS(SSL) Connector
Adds HTTPS protocol support to the TLS(SSL) Connector.
[tags]
connector

View File

@ -1,11 +1,11 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enable the InetAccessHandler to apply a include/exclude
control of the remote IP of requests.
Enable the InetAccessHandler.
Applies a include/exclude control of the remote IP of requests.
[tags]
handler
connector
[depend]
server

View File

@ -1,4 +1,10 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enable java.sql JPMS module.
[tags]
jpms
[jpms]
add-modules: java.sql

View File

@ -1,8 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
A noop module that creates an ini template useful for
setting JVM arguments (eg -Xmx )
A module that creates an ini template for setting JVM arguments (eg -Xmx ).
[ini-template]
## JVM Configuration

View File

@ -1,8 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables a low resource monitor on the server
that can take actions if threads and/or connections
Enables a low resource monitor on the server.
Can take actions if threads and/or connections
cross configured threshholds.
[depend]

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Log requests using CustomRequestLog and AsyncRequestLogWriter
Log requests using CustomRequestLog and AsyncRequestLogWriter.
[tags]
requestlog

View File

@ -1,9 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Adds the $JETTY_HOME/resources and/or $JETTY_BASE/resources
directory to the server classpath. Useful for configuration
property files (eg jetty-logging.properties)
Adds the $JETTY_HOME/resources and/or $JETTY_BASE/resources directory to the server classpath.
Useful for configuration property files (eg jetty-logging.properties)
[tags]
classpath

View File

@ -1,7 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enable first level session cache. If this module is not enabled, sessions will
Enable first level session cache.
If this module is not enabled, sessions will
use the DefaultSessionCache by default, so enabling via this module is only needed
if the configuration properties need to be changed from their defaults.

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
A trivial SessionCache that does not actually cache sessions.
A SessionCache that does not actually cache sessions.
[tags]
session

View File

@ -1,11 +1,10 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
The session management. By enabling this module, it allows
session management to be configured via the ini templates
created or by enabling other session-cache or session-store
modules. Without this module enabled, the server may still
use sessions, but their management cannot be configured.
Enable session management.
By enabling this module, it allows session management to be configured via the ini templates
created or by enabling other session-cache or session-store modules. Without this module enabled,
the server may still use sessions, but their management cannot be configured.
[tags]
session

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
JDBC Datasource connections for session storage
JDBC Datasource connections for session storage.
[depends]
jdbc

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
JDBC Driver connections for session storage
JDBC Driver connections for session storage.
[depend]
jdbc

View File

@ -8,6 +8,7 @@ the associated support modules.
[tags]
connector
ssl
internal
[depend]
server

View File

@ -1,11 +1,10 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enable detailed statistics collection for the server,
available via JMX.
Enable detailed statistics collection for the server.
[tags]
handler
server
[depend]
server

View File

@ -3,6 +3,7 @@ Test keystore with test SSL Certificate.
DO NOT USE IN PRODUCTION!!!
[tags]
demo
ssl
[depend]

View File

@ -4,7 +4,10 @@
#
[tags]
handler
server
[description]
Limit the threads per IP address for DOS protection.
[depend]
server

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables the Server thread pool.
Enables and configures the Server thread pool.
[depends]
logging

View File

@ -1,10 +1,9 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Puts a collection of jetty utility servlets and filters
on the server classpath (CGI, CrossOriginFilter, DosFilter,
MultiPartFilter, PushCacheFilter, QoSFilter, etc.) for
use by all webapplications.
Jetty utility servlets and filters available to a webapp.
Puts org.eclipse.jetty.servlets on the server classpath (CGI, CrossOriginFilter, DosFilter,
MultiPartFilter, PushCacheFilter, QoSFilter, etc.) for use by all webapplications.
[depend]
servlet

View File

@ -1,8 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enable spring configuration processing so all jetty style
xml files can optionally be written as spring beans
Enable spring configuration processing of jetty XML files.
All jetty style xml files can optionally be written as spring beans
[depend]
server

View File

@ -221,6 +221,10 @@ public class Main
public void listConfig(StartArgs args)
{
StartLog.endStartLog();
Modules modules = args.getAllModules();
// Dump Enabled Modules
modules.listEnabled();
// Dump Jetty Home / Base
args.dumpEnvironment();
@ -244,20 +248,17 @@ public class Main
public void listModules(StartArgs args)
{
final List<String> tags = args.getListModules();
StartLog.endStartLog();
System.out.println();
System.out.println("Available Modules:");
System.out.println("==================");
System.out.println("tags: " + tags);
args.getAllModules().dump(tags);
String t = tags.toString();
System.out.printf("%nModules %s:%n", t);
System.out.printf("=========%s%n", "=".repeat(t.length()));
args.getAllModules().listModules(tags);
}
// Dump Enabled Modules
System.out.println();
System.out.println("Enabled Modules:");
System.out.println("================");
Modules modules = args.getAllModules();
modules.dumpEnabled();
public void showModules(StartArgs args)
{
StartLog.endStartLog();
args.getAllModules().showModules(args.getShowModules());
}
/**
@ -388,12 +389,18 @@ public class Main
listConfig(args);
}
// Show modules
// List modules
if (args.getListModules() != null)
{
listModules(args);
}
// Show modules
if (args.getShowModules() != null)
{
showModules(args);
}
// Generate Module Graph File
if (args.getModuleGraphFilename() != null)
{

View File

@ -529,7 +529,7 @@ public class Module implements Comparable<Module>
public String getPrimaryTag()
{
return _tags.isEmpty() ? "*" : _tags.get(0);
return _tags.isEmpty() ? "untagged" : _tags.get(0);
}
public boolean isEnabled()

View File

@ -24,6 +24,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@ -35,6 +36,7 @@ import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@ -82,34 +84,16 @@ public class Modules implements Iterable<Module>
}
}
public void dump(List<String> tags)
public void showModules(List<String> modules)
{
Set<String> exclude = tags.stream().filter(t -> t.startsWith("-")).map(t -> t.substring(1)).collect(Collectors.toSet());
Set<String> include = tags.stream().filter(t -> !t.startsWith("-")).collect(Collectors.toSet());
boolean all = include.contains("*") || include.isEmpty();
AtomicReference<String> tag = new AtomicReference<>();
Stream<Module> stream = (modules.contains("*") || modules.isEmpty())
? _modules.stream().sorted()
: modules.stream().map(this::get);
_modules.stream()
.filter(m ->
stream.forEach(module ->
{
boolean included = all || m.getTags().stream().anyMatch(include::contains);
boolean excluded = m.getTags().stream().anyMatch(exclude::contains);
return included && !excluded;
})
.sorted()
.forEach(module ->
{
if (!module.getPrimaryTag().equals(tag.get()))
{
tag.set(module.getPrimaryTag());
System.out.printf("%nModules for tag '%s':%n", module.getPrimaryTag());
System.out.print("-------------------");
for (int i = module.getPrimaryTag().length(); i-- > 0; )
{
System.out.print("-");
}
System.out.println();
}
if (module == null)
return;
String label;
Set<String> provides = module.getProvides();
@ -178,8 +162,52 @@ public class Modules implements Iterable<Module>
});
}
public void dumpEnabled()
public void listModules(List<String> tags)
{
if (tags.contains("-*"))
return;
boolean wild = tags.contains("*");
Set<String> included = new HashSet<>();
if (wild)
tags.remove("*");
else
tags.stream().filter(t -> !t.startsWith("-")).forEach(included::add);
Set<String> excluded = new HashSet<>();
tags.stream().filter(t -> t.startsWith("-")).map(t -> t.substring(1)).forEach(excluded::add);
if (!included.contains("internal"))
excluded.add("internal");
Predicate<Module> filter = m -> (included.isEmpty() || m.getTags().stream().anyMatch(included::contains)) &&
!m.getTags().stream().anyMatch(excluded::contains);
Optional<Integer> max = _modules.stream().filter(filter).map(Module::getName).map(String::length).max(Integer::compareTo);
if (max.isEmpty())
return;
String format = "%" + max.get() + "s - %s%n";
Comparator<Module> comparator = wild ? Comparator.comparing(Module::getName) : Module::compareTo;
AtomicReference<String> tag = new AtomicReference<>();
_modules.stream().filter(filter).sorted(comparator).forEach(module ->
{
if (!wild && !module.getPrimaryTag().equals(tag.get()))
{
tag.set(module.getPrimaryTag());
System.out.printf("%n%s modules:", module.getPrimaryTag());
System.out.printf("%n%s---------%n", "-".repeat(module.getPrimaryTag().length()));
}
List<String> description = module.getDescription();
System.out.printf(format, module.getName(), description != null && description.size() > 0 ? description.get(0) : "");
});
}
public void listEnabled()
{
System.out.println();
System.out.println("Enabled Modules:");
System.out.println("----------------");
int i = 0;
List<Module> enabled = getEnabled();
for (Module module : enabled)

View File

@ -223,6 +223,7 @@ public class StartArgs
private boolean help = false;
private boolean stopCommand = false;
private List<String> listModules = null;
private List<String> showModules = null;
private boolean listClasspath = false;
private boolean listConfig = false;
private boolean version = false;
@ -346,7 +347,6 @@ public class StartArgs
System.out.println();
}
// Jetty Se
System.out.println();
}
@ -999,6 +999,11 @@ public class StartArgs
return listModules;
}
public List<String> getShowModules()
{
return showModules;
}
public boolean isRun()
{
return run;
@ -1245,20 +1250,35 @@ public class StartArgs
}
// Module Management
if ("--list-modules".equals(arg))
if ("--list-module".equals(arg) || "--list-modules".equals(arg))
{
listModules = Collections.singletonList("-internal");
run = false;
return;
}
if (arg.startsWith("--list-modules="))
if (arg.startsWith("--list-module=") || arg.startsWith("--list-modules="))
{
listModules = Props.getValues(arg);
run = false;
return;
}
// Module Management
if ("--show-module".equals(arg) || "--show-modules".equals(arg))
{
showModules = Collections.emptyList();
run = false;
return;
}
if (arg.startsWith("--show-module=") || arg.startsWith("--show-modules="))
{
showModules = Props.getValues(arg);
run = false;
return;
}
// jetty.base build-out : add to ${jetty.base}/start.ini
if ("--create-startd".equals(arg))
{

View File

@ -82,17 +82,11 @@ Debug and Start Logging:
issues where the jetty specific logger has not yet kicked
in due to startup configuration errors.
Module Management:
------------------
Jetty Module Management:
------------------------
--list-modules List non verbose modules defined by the system.
Looking for module files in ${jetty.base}/modules/*.mod and
--list-modules List Jetty modules defined in ${jetty.base}/modules/*.mod and
then ${jetty.home}/modules/*.mod
Will also list enabled state based on information
present on ..
o The command line
o The ${jetty.base}/start.ini
o The ${jetty.base}/start.d/*.ini files
--list-modules=<tag>(,<tag>)*
List modules by tag. Use '*' for all tags. Prefix a tag
@ -102,6 +96,10 @@ Module Management:
--list-all-modules
List all modules.
--show-modules=<module>(,<module>)*
Show the detail of the listed modules, including
dependencies, tags, libraries and XMLs
--module=<modulename>(,<modulename>)*
Temporarily enable a module from the command line.
Note: this can also be used in the ${jetty.base}/start.ini
@ -191,7 +189,6 @@ Advanced Commands:
Default is https://repo1.maven.org/maven2/.
Properties:
-----------
Properties are used to parameterize:

View File

@ -1,10 +1,9 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Adds a forwarded request customizer to the HTTP configuration used
by the Unix Domain Socket connector, for use when behind a proxy operating
in HTTP mode that adds forwarded-for style HTTP headers. Typically this
is an alternate to the Proxy Protocol used mostly for TCP mode.
Adds a forwarded request customizer for the Unix Domain Socket connector.
For use when behind a proxy operating in HTTP mode that adds forwarded-for style HTTP headers.
Typically this is an alternate to the Proxy Protocol used mostly for TCP mode.
[tags]
connector

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Adds an HTTP2C connetion factory to the Unix Domain Socket Connector
Adds an HTTP2C connetion factory to the Unix Domain Socket Connector.
It can be used when either the proxy forwards direct
HTTP/2C (unecrypted) or decrypted HTTP/2 traffic.

View File

@ -1,7 +1,7 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables the proxy protocol on the Unix Domain Socket Connector
Enables the proxy protocol on the Unix Domain Socket Connector.
http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt
This allows information about the proxied connection to be
efficiently forwarded as the connection is accepted.

View File

@ -1,8 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enable a secure request customizer on the HTTP Configuration
used by the Unix Domain Socket Connector.
Enable a secure request customizer on the HTTP Configuration.
Used by the Unix Domain Socket Connector.
This looks for a secure scheme transported either by the
unixsocket-forwarded, unixsocket-proxy-protocol or in a
HTTP2 request.

View File

@ -1,11 +1,10 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables a Unix Domain Socket Connector that can receive
requests from a local proxy and/or SSL offloader (eg haproxy) in either
HTTP or TCP mode. Unix Domain Sockets are more efficient than
localhost TCP/IP connections as they reduce data copies, avoid
needless fragmentation and have better dispatch behaviours.
Enables a Unix Domain Socket Connector.
The connector can receive requests from a local proxy and/or SSL offloader (eg haproxy) in either
HTTP or TCP mode. Unix Domain Sockets are more efficient than localhost TCP/IP connections
as they reduce data copies, avoid needless fragmentation and have better dispatch behaviours.
When enabled with corresponding support modules, the connector can
accept HTTP, HTTPS or HTTP2C traffic.

View File

@ -1,8 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Enables a Unix Domain Socket Connector that can receive
requests from a local proxy and/or SSL offloader (eg haproxy) in either
Enables a Unix Domain Socket Connector.
The connector can receive requests from a local proxy and/or SSL offloader (eg haproxy) in either
HTTP or TCP mode. Unix Domain Sockets are more efficient than
localhost TCP/IP connections as they reduce data copies, avoid
needless fragmentation and have better dispatch behaviours.

View File

@ -1,8 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Redirects JVMs console stderr and stdout to a log file,
including output from Jetty's default StdErrLog logging.
Redirects JVMs console stderr and stdout to a log file.
includes output from Jetty's default StdErrLog logging.
[tags]
logging

View File

@ -1,8 +1,8 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description]
Adds support for servlet specification webapplication to the server
classpath. Without this, only Jetty specific handlers may be deployed.
Adds support for servlet specification webapplication to the server classpath.
Without this, only Jetty specific handlers may be deployed.
[depend]
servlet

View File

@ -4,11 +4,16 @@
# Additional ini files are in demo-base/start.d
#
[description]
Configure the Jetty Demo base.
[depends]
rewrite
jaas
test-keystore
[tags]
demo
[xml]
# Enable rewrite examples