Merged branch 'jetty-9.4.x' into 'master'.

This commit is contained in:
Simone Bordet 2016-10-06 16:37:43 +02:00
commit bcc29de3eb
73 changed files with 519 additions and 117 deletions

View File

@ -37,6 +37,7 @@ import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.CountingCallback;
import org.eclipse.jetty.util.component.Destroyable;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
@ -470,6 +471,7 @@ public abstract class HttpReceiver
*/
protected void reset()
{
destroyDecoder(decoder);
decoder = null;
}
@ -482,9 +484,18 @@ public abstract class HttpReceiver
*/
protected void dispose()
{
destroyDecoder(decoder);
decoder = null;
}
private static void destroyDecoder(ContentDecoder decoder)
{
if (decoder instanceof Destroyable)
{
((Destroyable)decoder).destroy();
}
}
public boolean abort(HttpExchange exchange, Throwable failure)
{
// Update the state to avoid more response processing.

View File

@ -31,18 +31,24 @@ Not only does the `quickstart-web.xml` contain all the discovered Servlets, Filt
With the quickstart mechanism, Jetty is able to entirely bypass all scanning and discovery modes and start a webapp in a predictable and fast way.
Tests have shown that webapps that took many seconds to scan and deploy can now be deployed in a few hundred milliseconds.
Additionally, if debug logging is enabled, the generated quickstart information is tagged with the origin of every element, which can be useful for debugging purposes.
==== Setting up Quickstart
To use quickstart the module has to be available to the Jetty instance.
In a standard Jetty distribution it can be configured with the following command:
===== Prerequisites
====== Jetty Distribution
In a standard Jetty distribution the quickstart module can be configured with the following command:
[source, screen, subs="{sub-order}"]
----
$ java -jar $JETTY_HOME/start.jar --add-to-start=quickstart
----
In a Maven project this is done by adding a dependency on the artifact ID `jetty-quickstart`.
====== Embedded
In a Maven project you add a dependency on the artifact `jetty-quickstart`.
[source, xml, subs="{sub-order}"]
----
@ -53,26 +59,62 @@ In a Maven project this is done by adding a dependency on the artifact ID `jetty
</dependency>
----
Additionally, for those using Maven, the link:#get-up-and-running[Jetty Maven Plugin] has a goal, link:#jetty-effective-web-xml[`jetty:effective-web-xml`], which performs quickstart operations.
It should be noted, however, that the Jetty Maven Plugin also includes additional items on it's classpath which may not be needed by the webapp.
Deployed webapps need to be instances of link:{JDURL}/org/eclipse/jetty/quickstart/QuickStartWebApp.html[`org.eclipse.jetty.quickstart.QuickStartWebApp`] rather than the normal `org.eclipse.jetty.webapp.WebAppContext`.
If a web application already has a `webapps/myapp.xml` file, simply change the class in the `Configure` element.
Otherwise, create a `webapps/myapp.xml` file as follows:
===== Configuration
Webapps need to be instances of link:{JDURL}/org/eclipse/jetty/quickstart/QuickStartWebApp.html[`org.eclipse.jetty.quickstart.QuickStartWebApp`] rather than the normal `org.eclipse.jetty.webapp.WebAppContext`.
`org.eclipse.jetty.quickstart.QuickStartWebApp` instances offer the same setters as the familiar `org.eclipse.jetty.webapp.WebAppContext`, with the addition of:
autoPreconfigure::
(true/false).
If true, the first time the webapp is run, the WEB-INF/quickstart-web.xml is generated BEFORE the webapp is deployed.
Subsequent runs use the previously generated quickstart file.
====== In XML
If a web application already has a context xml file, eg `webapps/myapp.xml` file, simply change the class in the `Configure` element.
Otherwise, create a context xml file with the following information (in addition to the usual setting of contextPath, war etc):
[source, xml, subs="{sub-order}"]
----
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
<Configure class="org.eclipse.jetty.quickstart.QuickStartWebApp">
<Set name="war"><Property name="jetty.webapps" default="."/>/benchmark.war</Set>
<Set name="contextPath">/benchmark</Set>
<Set name="autoPreconfigure">true</Set>
</Configure>
----
For embedded implementations of Jetty, invoking the link:{JDURL}/org/eclipse/jetty/quickstart/PreconfigureQuickStartWar.html[`org.eclipse.jetty.quickstart.PreconfigureQuickStartWar`] class can be used to configure war files for quickstart deployment.
This will create the `quickstart-web.xml` before the first deployment.
====== In Code
Create an instance of link:{JDURL}/org/eclipse/jetty/quickstart/QuickStartWebApp.html[`org.eclipse.jetty.quickstart.QuickStartWebApp`] rather than the normal `org.eclipse.jetty.webapp.WebAppContext`. You then use the QuickStartWebApp instance in exactly the same way that you would a WebAppContext.
Here's a snippet:
[source, java]
----
QuickStartWebApp webapp = new QuickStartWebApp();
webapp.setAutoPreconfigure(true);
----
====== Pre-generating the quickstart-web.xml file
Rather than use the `autoPreconfigure` feature of the QuickStartWebApp - which lazily generates the `quickstart-web.xml` file - you can eagerly pre-generate it for an existing war by invoking as a main class link:{JDURL}/org/eclipse/jetty/quickstart/PreconfigureQuickStartWar.html[`org.eclipse.jetty.quickstart.PreconfigureQuickStartWar`].
Note that you will need to provide all necessary jetty jars on the command line classpath.
This will unpack the war if necessary, and create the `quickstart-web.xml` before the first deployment:
[source, screen, subs="{sub-order}"]
----
$ java -cp [jetty classpath] org.eclipse.jetty.quickstart.PreconfigureQuickStartWar myapp.war
----
Run the class with no arguments to see other runtime options.
Alternatively, you could use the link:#get-up-and-running[Jetty Maven Plugin] goal link:#jetty-effective-web-xml[`jetty:effective-web-xml`]: this will generate quickstart information, but print it to stderr.
The goal provides a configuration option to save the output to a file, which you can then copy into your webapp's WEB-INF dir.
Note that as the Jetty Maven Plugin is a general tool for running webapps, it may have more jars on its classpath than are needed by your application, and thus may generate extra quickstart information: we recommend that you use this goal only as a quick guide to the type of information that quickstart generates.
// ==== Preconfiguring the web application
//
@ -81,14 +123,8 @@ This will create the `quickstart-web.xml` before the first deployment.
//
// It is also possible to preconfigure a war file manually by running the class link:{JDURL}/org/eclipse/jetty/quickstart/PreconfigureQuickStartWar.html[org.eclipse.jetty.quickstart.PreconfigureQuickStartWar] with the jetty-all-uber (aggregate) jar:
//
// [source, screen, subs="{sub-order}"]
// ----
// $ java -cp jetty-all-{VERSION}-uber.jar org.eclipse.jetty.quickstart.PreconfigureQuickStartWar myapp.war
// ----
//
// This will create the `quickstart-web.xml` file before the first deployment.
// Note that this can also be a good debugging tool for discovered configuration and if run with debug turned on the origin of every element is included in the `quickstart-web.xml` file.
// Run the class with no arguments to see other runtime options.
==== Avoiding TLD Scans with precompiled JSPs

View File

@ -1,6 +1,10 @@
[description]
Enables GCloud Datastore API and implementation
[Tags]
3rdparty
gcloud
[depends]
gcloud
jcl-api

View File

@ -1,6 +1,10 @@
[description]
Control GCloud API classpath
[Tags]
3rdparty
gcloud
[files]
basehome:modules/gcloud/gcloud.xml|etc/gcloud.xml

View File

@ -1,6 +1,10 @@
[description]
Enables GCloudDatastore session management.
[Tags]
session
gcloud
[provides]
session-store

View File

@ -1,6 +1,9 @@
[description]
Deploys the Hawtio console as a webapplication.
[Tags]
3rdparty
[depend]
stats
deploy

View File

@ -1,6 +1,9 @@
[description]
Deploys the JAMon webapplication
[Tags]
3rdparty
[depend]
stats
deploy

View File

@ -1,6 +1,9 @@
[description]
Deploys the Jminix JMX Console within the server
[Tags]
3rdparty
[depend]
stats
jmx

View File

@ -1,6 +1,9 @@
[description]
Deploys the Jolokia console as a web application.
[Tags]
3rdparty
[depend]
stats
deploy

View File

@ -25,6 +25,7 @@ import java.util.zip.ZipException;
import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.component.Destroyable;
/**
* Decoder for the "gzip" encoding.
@ -32,7 +33,7 @@ import org.eclipse.jetty.util.BufferUtil;
* A decoder that inflates gzip compressed data that has been
* optimized for async usage with minimal data copies.
*/
public class GZIPContentDecoder
public class GZIPContentDecoder implements Destroyable
{
private final Inflater _inflater = new Inflater(true);
private final ByteBufferPool _pool;
@ -383,6 +384,12 @@ public class GZIPContentDecoder
_flags = 0;
}
@Override
public void destroy()
{
_inflater.end();
}
public boolean isFinished()
{
return _state == State.INITIAL;

View File

@ -2,6 +2,12 @@
Enables HTTP2 protocol support on the TLS(SSL) Connector,
using the ALPN extension to select which protocol to use.
[Tags]
connector
http2
http
ssl
[depend]
ssl
alpn

View File

@ -2,6 +2,11 @@
Enables the HTTP2C protocol on the HTTP Connector
The connector will accept both HTTP/1 and HTTP/2 connections.
[Tags]
connector
http2
http
[depend]
http

View File

@ -1,6 +1,9 @@
[description]
Enables session data store in a local Infinispan cache
[Tags]
session
[provides]
session-store

View File

@ -1,6 +1,9 @@
[description]
Enables session data store in a remote Infinispan cache
[Tags]
session
[provides]
session-store

View File

@ -1,6 +1,9 @@
[description]
Memcache cache for SessionData
[Tags]
session
[depends]
session-store
slf4j-api

View File

@ -1,6 +1,9 @@
[description]
Enables NoSql session management with a MongoDB driver.
[Tags]
session
[provides]
session-store

View File

@ -3,6 +3,9 @@ Enables the DebugListener to generate additional
logging regarding detailed request handling events.
Renames threads to include request URI.
[Tags]
debug
[depend]
deploy

View File

@ -2,6 +2,9 @@
Deprecated Debug Log using the DebugHandle.
Replaced with the debug module.
[Tags]
debug
[depend]
server

View File

@ -2,6 +2,9 @@
Adds all jar files discovered in $JETTY_HOME/lib/ext
and $JETTY_BASE/lib/ext to the servers classpath.
[Tags]
classpath
[lib]
lib/ext/**.jar

View File

@ -2,6 +2,9 @@
Enable GzipHandler for dynamic gzip compression
for the entire server.
[Tags]
handler
[depend]
server

View File

@ -2,6 +2,9 @@
Adds a forwarded request customizer to the HTTP Connector
to process forwarded-for style headers from a proxy.
[Tags]
connector
[depend]
http

View File

@ -3,6 +3,10 @@ Enables a HTTP connector on the server.
By default HTTP/1 is support, but HTTP2C can
be added to the connector with the http2c module.
[Tags]
connector
http
[depend]
server

View File

@ -1,6 +1,12 @@
[description]
Adds HTTPS protocol support to the TLS(SSL) Connector
[Tags]
connector
https
http
ssl
[depend]
ssl

View File

@ -2,6 +2,9 @@
Enable the ipaccess handler to apply a white/black list
control of the remote IP of requests.
[Tags]
handler
[depend]
server

View File

@ -1,6 +1,7 @@
[description]
A noop module that creates an ini template useful for
setting JVM arguments (eg -Xmx )
[ini-template]
## JVM Configuration
## If JVM args are include in an ini file then --exec is needed

View File

@ -1,6 +1,11 @@
[description]
Enables logback request log.
[Tags]
requestlog
logging
logback
[depend]
server
logback-core

View File

@ -5,6 +5,10 @@ This allows a Proxy operating in TCP mode to transport
details of the proxied connection to the server.
Both V1 and V2 versions of the protocol are supported.
[Tags]
connector
ssl
[depend]
ssl

View File

@ -1,6 +1,9 @@
[description]
Enables a NCSA style request log.
[Tags]
requestlog
[depend]
server
@ -36,4 +39,4 @@ logs/
# jetty.requestlog.timezone=GMT
## Whether to log LogLatency
# jetty.requestlog.loglatency=false
# jetty.requestlog.loglatency=false

View File

@ -3,6 +3,9 @@ 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
[lib]
resources/

View File

@ -4,6 +4,9 @@ If not enabled, sessions will use a HashSessionCache by default, so enabling
via this module is only needed if the configuration properties need to be
changed.
[Tags]
session
[provides]
session-cache

View File

@ -1,6 +1,9 @@
[description]
A trivial SessionCache that does not actually cache sessions.
[Tags]
session
[provides]
session-cache

View File

@ -1,6 +1,9 @@
[description]
Enables caching of SessionData in front of a SessionDataStore.
[Tags]
session
[depend]
session-store

View File

@ -1,6 +1,9 @@
[description]
Enables session persistent storage in files.
[Tags]
session
[provides]
session-store

View File

@ -1,6 +1,9 @@
[description]
Enables JDBC peristent/distributed session storage.
[Tags]
session
[provides]
session-store

View File

@ -5,6 +5,9 @@ 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
[depends]
server

View File

@ -3,6 +3,10 @@ Enables a TLS(SSL) Connector on the server.
This may be used for HTTPS and/or HTTP2 by enabling
the associated support modules.
[Tags]
connector
ssl
[depend]
server

View File

@ -2,6 +2,9 @@
Enable detailed statistics collection for the server,
available via JMX.
[Tags]
handler
[depend]
server

View File

@ -3,6 +3,9 @@
# Applies ThreadLimiteHandler to entire server
#
[Tags]
handler
[depend]
server

View File

@ -37,6 +37,7 @@ import org.eclipse.jetty.io.EofException;
import org.eclipse.jetty.io.RuntimeIOException;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.component.Destroyable;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
@ -80,7 +81,7 @@ public class HttpInput extends ServletInputStream implements Runnable
* {@link #readFrom(Content)} and then passes any {@link Content} returned
* to the next {@link Interceptor}.
*/
public static class ChainedInterceptor implements Interceptor
public static class ChainedInterceptor implements Interceptor, Destroyable
{
private final Interceptor _prev;
private final Interceptor _next;
@ -106,8 +107,16 @@ public class HttpInput extends ServletInputStream implements Runnable
{
return getNext().readFrom(getPrev().readFrom(content));
}
@Override
public void destroy()
{
if (_prev instanceof Destroyable)
((Destroyable)_prev).destroy();
if (_next instanceof Destroyable)
((Destroyable)_next).destroy();
}
}
private final static Logger LOG = Log.getLogger(HttpInput.class);
private final static Content EOF_CONTENT = new EofContent("EOF");
@ -155,6 +164,8 @@ public class HttpInput extends ServletInputStream implements Runnable
_contentConsumed = 0;
_firstByteTimeStamp = -1;
_blockUntil = 0;
if (_interceptor instanceof Destroyable)
((Destroyable)_interceptor).destroy();
_interceptor = null;
}
}

View File

@ -24,18 +24,51 @@ import org.eclipse.jetty.http.GZIPContentDecoder;
import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.server.HttpInput;
import org.eclipse.jetty.server.HttpInput.Content;
import org.eclipse.jetty.util.component.Destroyable;
/**
* A HttpInput Interceptor that inflates GZIP encoded request content.
*
*/
public class GzipHttpInputInterceptor implements HttpInput.Interceptor
public class GzipHttpInputInterceptor implements HttpInput.Interceptor, Destroyable
{
class Decoder extends GZIPContentDecoder
private final Decoder _decoder;
private ByteBuffer _chunk;
public GzipHttpInputInterceptor(ByteBufferPool pool, int bufferSize)
{
public Decoder(ByteBufferPool pool, int bufferSize)
_decoder = new Decoder(pool, bufferSize);
}
@Override
public Content readFrom(Content content)
{
_decoder.decodeChunks(content.getByteBuffer());
final ByteBuffer chunk = _chunk;
if (chunk == null)
return null;
return new Content(chunk)
{
super(pool,bufferSize);
@Override
public void succeeded()
{
_decoder.release(chunk);
}
};
}
@Override
public void destroy()
{
_decoder.destroy();
}
private class Decoder extends GZIPContentDecoder
{
private Decoder(ByteBufferPool pool, int bufferSize)
{
super(pool, bufferSize);
}
@Override
@ -52,32 +85,4 @@ public class GzipHttpInputInterceptor implements HttpInput.Interceptor
super.decodeChunks(compressed);
}
}
private final Decoder _decoder;
private ByteBuffer _chunk;
public GzipHttpInputInterceptor(ByteBufferPool pool, int bufferSize)
{
_decoder = new Decoder(pool,bufferSize);
}
@Override
public Content readFrom(Content content)
{
_decoder.decodeChunks(content.getByteBuffer());
final ByteBuffer chunk = _chunk;
if (chunk==null)
return null;
return new Content(chunk)
{
@Override
public void succeeded()
{
_decoder.release(chunk);
}
};
}
}

View File

@ -243,16 +243,19 @@ public class Main
public void listModules(StartArgs args)
{
List<String> tags = args.getListModules();
StartLog.endStartLog();
System.out.println();
System.out.println("Jetty All Available Modules:");
System.out.println("----------------------------");
args.getAllModules().dump();
System.out.println("Available Modules:");
System.out.println("==================");
System.out.println("tags: "+tags);
args.getAllModules().dump(tags);
// Dump Enabled Modules
System.out.println();
System.out.println("Jetty Selected Module Ordering:");
System.out.println("-------------------------------");
System.out.println("Enabled Modules:");
System.out.println("================");
Modules modules = args.getAllModules();
modules.dumpEnabled();
}
@ -381,7 +384,7 @@ public class Main
}
// Show modules
if (args.isListModules())
if (args.getListModules()!=null)
{
listModules(args);
}

View File

@ -55,7 +55,7 @@ import java.util.stream.Collectors;
* A module may be enabled, either directly by name or transiently via a dependency
* from another module by name or provided capability.
*/
public class Module
public class Module implements Comparable<Module>
{
private static final String VERSION_UNSPECIFIED = "9.2";
private static Pattern MOD_NAME = Pattern.compile("^(.*)\\.mod",Pattern.CASE_INSENSITIVE);
@ -96,6 +96,9 @@ public class Module
/** List of provides for this Module */
private final Set<String> _provides=new HashSet<>();
/** List of tags for this Module */
private final List<String> _tags=new ArrayList<>();
/** Boolean true if directly enabled, false if all selections are transitive */
private boolean _notTransitive;
@ -328,6 +331,10 @@ public class Module
case "FILES":
_files.add(line);
break;
case "TAG":
case "TAGS":
_tags.add(line);
break;
case "DEFAULTS": // old name introduced in 9.2.x
case "INI": // new name for 9.3+
_defaultConfig.add(line);
@ -446,6 +453,16 @@ public class Module
return _description;
}
public List<String> getTags()
{
return _tags;
}
public String getPrimaryTag()
{
return _tags.isEmpty()?"*":_tags.get(0);
}
public boolean isEnabled()
{
return !_enables.isEmpty();
@ -504,4 +521,13 @@ public class Module
out.println();
out.flush();
}
@Override
public int compareTo(Module m)
{
int by_tag = getPrimaryTag().compareTo(m.getPrimaryTag());
if (by_tag!=0)
return by_tag;
return getName().compareTo(m.getName());
}
}

View File

@ -21,7 +21,6 @@ package org.eclipse.jetty.start;
import java.io.IOException;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@ -30,6 +29,7 @@ import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@ -57,59 +57,92 @@ public class Modules implements Iterable<Module>
}
}
public void dump()
public void dump(List<String> tags)
{
List<String> ordered = _modules.stream().map(m->{return m.getName();}).collect(Collectors.toList());
Collections.sort(ordered);
ordered.stream().map(n->{return get(n);}).forEach(module->
{
String status = "[ ]";
if (module.isTransitive())
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<>();
_modules.stream()
.filter(m->
{
status = "[t]";
}
else if (module.isEnabled())
boolean included = all || m.getTags().stream().anyMatch(t->include.contains(t));
boolean excluded = m.getTags().stream().anyMatch(t->exclude.contains(t));
return included && !excluded;
})
.sorted()
.forEach(module->
{
status = "[x]";
}
System.out.printf("%n %s Module: %s%n",status,module.getName());
if (module.getProvides().size()>1)
{
System.out.printf(" Provides: %s%n",module.getProvides());
}
for (String description : module.getDescription())
{
System.out.printf(" : %s%n",description);
}
for (String parent : module.getDepends())
{
System.out.printf(" Depend: %s%n",parent);
}
for (String optional : module.getOptional())
{
System.out.printf(" Optional: %s%n",optional);
}
for (String lib : module.getLibs())
{
System.out.printf(" LIB: %s%n",lib);
}
for (String xml : module.getXmls())
{
System.out.printf(" XML: %s%n",xml);
}
for (String jvm : module.getJvmArgs())
{
System.out.printf(" JVM: %s%n",jvm);
}
if (module.isEnabled())
{
for (String selection : module.getEnableSources())
if (!module.getPrimaryTag().equals(tag.get()))
{
System.out.printf(" Enabled: %s%n",selection);
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();
}
}
});
String label;
Set<String> provides = module.getProvides();
provides.remove(module.getName());
System.out.printf("%n Module: %s %s%n",module.getName(),provides.size()>0?provides:"");
for (String description : module.getDescription())
{
System.out.printf(" : %s%n",description);
}
if (!module.getTags().isEmpty())
{
label=" Tags: %s";
for (String t : module.getTags())
{
System.out.printf(label,t);
label=", %s";
}
System.out.println();
}
if (!module.getDepends().isEmpty())
{
label=" Depend: %s";
for (String parent : module.getDepends())
{
System.out.printf(label,parent);
label=", %s";
}
System.out.println();
}
if (!module.getOptional().isEmpty())
{
label=" Optional: %s";
for (String parent : module.getOptional())
{
System.out.printf(label,parent);
label=", %s";
}
System.out.println();
}
for (String lib : module.getLibs())
{
System.out.printf(" LIB: %s%n",lib);
}
for (String xml : module.getXmls())
{
System.out.printf(" XML: %s%n",xml);
}
for (String jvm : module.getJvmArgs())
{
System.out.printf(" JVM: %s%n",jvm);
}
if (module.isEnabled())
{
for (String selection : module.getEnableSources())
{
System.out.printf(" Enabled: %s%n",selection);
}
}
});
}
public void dumpEnabled()

View File

@ -170,7 +170,7 @@ public class StartArgs
private boolean help = false;
private boolean stopCommand = false;
private boolean listModules = false;
private List<String> listModules = null;
private boolean listClasspath = false;
private boolean listConfig = false;
private boolean version = false;
@ -750,7 +750,7 @@ public class StartArgs
return listConfig;
}
public boolean isListModules()
public List<String> getListModules()
{
return listModules;
}
@ -873,7 +873,7 @@ public class StartArgs
if (arg.equals("--create-files"))
{
run = false;
download = true;
download = true;boolean
licenseCheckRequired = true;
return;
}
@ -938,10 +938,25 @@ public class StartArgs
return;
}
// Module Management
if ("--list-all-modules".equals(arg))
{
listModules = Collections.singletonList("*");
run = false;
return;
}
// Module Management
if ("--list-modules".equals(arg))
{
listModules = true;
listModules = Collections.singletonList("-verbose");
run = false;
return;
}
if (arg.startsWith("--list-modules="))
{
listModules = Props.getValues(arg);
run = false;
return;
}

View File

@ -59,7 +59,7 @@ Debug and Start Logging:
Module Management:
------------------
--list-modules List all modules defined by the system.
--list-modules List non verbose modules defined by the system.
Looking for module files in ${jetty.base}/modules/*.mod and
then ${jetty.home}/modules/*.mod
Will also list enabled state based on information
@ -67,6 +67,13 @@ Module Management:
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
with '-' to exclude the tag.
--list-all-modules
List all modules.
--module=<modulename>(,<modulename>)*
Temporarily enable a module from the command line.

View File

@ -4,6 +4,9 @@ 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.
[Tags]
connector
[depend]
unixsocket-http

View File

@ -4,6 +4,10 @@ It should be used when a proxy is forwarding either HTTP or decrypted
HTTPS traffic to the connector and may be used with the
unix-socket-http2c modules to upgrade to HTTP/2.
[Tags]
connector
http
[depend]
unixsocket

View File

@ -3,6 +3,10 @@ Adds a 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.
[Tags]
connector
http2
[depend]
unixsocket-http

View File

@ -8,6 +8,9 @@ SSL properties may be interpreted by the unixsocket-secure
module to indicate secure HTTPS traffic. Typically this
is an alternate to the forwarded module.
[Tags]
connector
[depend]
unixsocket

View File

@ -5,6 +5,9 @@ This looks for a secure scheme transported either by the
unixsocket-forwarded, unixsocket-proxy-protocol or in a
HTTP2 request.
[Tags]
connector
[depend]
unixsocket-http

View File

@ -7,6 +7,9 @@ needless fragmentation and have better dispatch behaviours.
When enabled with corresponding support modules, the connector can
accept HTTP, HTTPS or HTTP2C traffic.
[Tags]
connector
[depend]
server

View File

@ -2,6 +2,12 @@
Provides a Java Commons Logging implementation that logs to the SLF4J API.
Requires another module that provides and SLF4J implementation.
[tags]
logging
jcl
slf4j
verbose
[depends]
slf4j-api

View File

@ -2,6 +2,11 @@
Provides a Java Commons Logging implementation.
To receive jetty logs the jetty-slf4j and slf4j-jcl must also be enabled.
[tags]
logging
jcl
verbose
[depends]
[provides]

View File

@ -2,6 +2,9 @@
Provides a Jetty Logging implementation that logs to the Java Util Logging API.
Requires another module that provides a Java Util Logging implementation.
[tags]
logging
[provide]
logging

View File

@ -3,6 +3,10 @@ Provides a Jetty Logging implementation that logs to the log4j API.
Uses the slf4j mechanism as an intermediary
Requires another module that provides an log4j implementation.
[tags]
logging
log4j
[depend]
jetty-slf4j
slf4j-log4j

View File

@ -3,6 +3,11 @@ Provides a Jetty Logging implementation that logs to the log4j API.
Uses the slf4j and log4j v1.2 mechanisms as intermediaries.
Requires another module that provides an log4j2 implementation.
[tags]
logging
log4j2
log4j
[depend]
jetty-slf4j
slf4j-log4j2

View File

@ -2,6 +2,9 @@
Provides a Jetty Logging implementation that logs to logback.
Uses the slf4j API as an intermediary
[tags]
logging
[depend]
jetty-slf4j
slf4j-logback

View File

@ -2,6 +2,9 @@
Enables the Jetty Logging implementation and installs a template
configuration in ${jetty.base} resources/jetty-logging.properties.
[tags]
logging
[depends]
resources

View File

@ -2,6 +2,10 @@
Provides a Jetty Logging implementation that logs to the SLF4J API.
Requires another module that provides and SLF4J implementation.
[tags]
logging
slf4j
[depend]
slf4j-api
slf4j-impl

View File

@ -3,6 +3,12 @@ Provides a Log4j v1.2 implementation that logs to the Log4j v2 API.
Requires another module that provides and Log4j v2 implementation.
To receive jetty logs the jetty-slf4j and slf4j-log4j must also be enabled.
[tags]
logging
log4j2
log4j
verbose
[depends]
log4j2-api
log4j2-impl

View File

@ -2,6 +2,11 @@
Provides a Log4j v1.2 API and implementation.
To receive jetty logs enable the jetty-slf4j and slf4j-log4j modules.
[tags]
logging
log4j
verbose
[depends]
resources

View File

@ -3,6 +3,12 @@ Provides the Log4j v2 API
Requires another module that provides an Log4j v2 implementation.
To receive jetty logs enable the jetty-slf4j, slf4j-log4j and log4j-log4j2 modules.
[tags]
logging
log4j2
log4j
verbose
[files]
maven://org.apache.logging.log4j/log4j-api/${log4j2.version}|lib/log4j/log4j-api-${log4j2.version}.jar

View File

@ -2,6 +2,12 @@
Provides a Log4j v2 implementation.
To receive jetty logs enable the jetty-slf4j, slf4j-log4j and log4j-log4j2 modules.
[tags]
logging
log4j2
log4j
verbose
[depends]
log4j2-api
resources

View File

@ -3,6 +3,13 @@ Provides a Log4j v2 implementation that logs to the SLF4J API.
Requires another module that provides and SLF4J implementation.
To receive jetty logs enable the jetty-slf4j module.
[tags]
logging
log4j2
log4j
slf4j
verbose
[depends]
log4j2-api
slf4j-api

View File

@ -2,6 +2,10 @@
Provides the logback core implementation, used by slf4j-logback
and logback-access
[tags]
logging
verbose
[files]
maven://ch.qos.logback/logback-core/${logback.version}|lib/logback/logback-core-${logback.version}.jar

View File

@ -2,6 +2,11 @@
Provides SLF4J API. Requires a slf4j implementation (eg slf4j-simple)
otherwise a noop implementation is used.
[tags]
logging
slf4j
verbose
[files]
maven://org.slf4j/slf4j-api/${slf4j.version}|lib/slf4j/slf4j-api-${slf4j.version}.jar

View File

@ -3,6 +3,12 @@ Provides a SLF4J implementation that logs to the Java Commons Logging API.
Requires another module that provides an JCL implementation.
To receive jetty logs enable the jetty-slf4j module.
[tags]
logging
jcl
slf4j
verbose
[depend]
slf4j-api
jcl-api

View File

@ -2,6 +2,11 @@
Provides a SLF4J implementation that logs to the Java Util Logging API.
To receive jetty logs enable the jetty-slf4j module.
[tags]
logging
slf4j
verbose
[depend]
slf4j-api

View File

@ -3,6 +3,12 @@ Provides a SLF4J implementation that logs to the Log4j v1.2 API.
Requires another module that provides a Log4j implementation.
To receive jetty logs enable the jetty-slf4j module.
[tags]
logging
log4j
slf4j
verbose
[depend]
slf4j-api
log4j-api

View File

@ -3,6 +3,13 @@ Provides a SLF4J implementation that logs to the Log4j v2 API.
Requires another module that provides a Log4j2 implementation.
To receive jetty logs enable the jetty-slf4j2 module.
[tags]
logging
log4j2
log4j
slf4j
verbose
[depend]
slf4j-api
log4j2-api

View File

@ -2,6 +2,11 @@
Provides a SLF4J implementation that logs to Logback classic
To receive jetty logs enable the jetty-slf4j module.
[tags]
logging
slf4j
verbose
[depend]
slf4j-api
logback-core

View File

@ -2,6 +2,11 @@
Provides SLF4J simple logging implementation.
To receive jetty logs enable the jetty-slf4j module.
[tags]
logging
slf4j
verbose
[depend]
slf4j-api

View File

@ -2,6 +2,9 @@
Redirects JVMs stderr and stdout to a log file,
including output from Jetty's default StdErrLog logging.
[tags]
logging
[xml]
etc/stderrout-logging.xml