org.eclipse.jetty.start.usage.txt Maven / Gradle / Ivy
Usage: java -jar start.jar [options...] [properties...] [configs...]
The start.jar builds a classpath and executes a main java class with
a classloader built from that classpath. By default the start.jar
mechanism is configured to start the jetty server, but it can be
configured to start any java main class.
Command Line Options:
---------------------
--help This help / usage information.
--version Print the version information for Jetty and
dependent jars, then exit.
--list-classpath Print the classpath information that will be used to start
Jetty
--list-config List the resolved configuration that will be used to
start Jetty.
Output includes:
o Java Environment
o Jetty Environment
o JVM Arguments
o Properties
o Server Classpath
o Server XML Configuration
--dry-run Print the command line that the start.jar generates,
then exit. This may be used to generate command lines
when the start.ini includes -X or -D arguments.
--exec Run the generated command line (see --dry-run) in
a sub process. This can be used when start.ini
contains -X or -D arguments, but creates an extra
JVM instance.
Debug and Start Logging:
------------------------
--debug Enable debug output of the startup procedure.
Note: this does not setup debug for Jetty itself.
If you want debug for Jetty, configure your logging.
http://www.eclipse.org/jetty/documentation/
--start-log-file=
A filename, relative to ${jetty.base}, where all startup
output will be sent. This is useful for capturing startup
issues where the jetty specific logger has not yet kicked
in due to startup configuration errors.
Module Management:
------------------
--list-modules List all 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
present on ..
o The command line
o The ${jetty.base}/start.ini
o The ${jetty.base}/start.d/*.ini files
--module=(,)*
Temporarily enable a module from the command line.
Note: this can also be used in the ${jetty.base}/start.ini
or ${jetty.base}/start.d/*.ini files.
--add-to-start=(,)*
Enable a module by appending lines to the
${jetty.base}/start.ini file.
Lines that are added come from the ini template that
the module itself maintains.
Transitive module dependencies are followed and all
modules that the specified module depends on are also
enabled in the ${jetty.base}/start.ini using the same
techniques.
Note: not all modules have ini templates.
--add-to-startd=(,)*
Enable a module via creation of an ini file in the
${jetty.base}/start.d/ directory.
Uses ini template that the module itself maintains.
Transitive module dependencies are followed and all
modules that the specified module depends on are also
enabled via their own ini files in the same directory.
Note: not all modules have ini templates.
--write-module-graph=
Create a graphviz *.dot file of the module graph as it
exists for the active ${jetty.base}.
See http://graphviz.org/ for details on how to post-process
this file into the output best suited for your needs.
--create-files Create any missing files that are required by initialised
modules. This may download a file from the network if the
module provides a URL.
Startup / Shutdown Command Line:
--------------------------------
--stop Send a stop signal to the running Jetty instance.
The server must have been started with a STOP.PORT=
property set and the stop command must have the same property.
Properties:
STOP.PORT=[number]
The port to use to stop the running Jetty server.
Required along with STOP.KEY if you want to use the --stop option above.
STOP.KEY=[alphanumeric]
The passphrase defined to stop the server.
Requried along with STOP.PORT if you want to use the --stop option above.
STOP.WAIT=[number]
The time (in seconds) to wait for confirmation that the running
Jetty server has stopped. If not specified, the stopper will wait
indefinitely. Use in conjunction with the --stop option.
Advanced Commands:
------------------
--lib=
Add arbitrary classpath entries to the the server classpath.
--include-jetty-dir=
Include an extra jetty directory to use as a source
for configuration details. This directory behaves similarly
to ${jetty.base} but sits at a layer between ${jetty.base}
and ${jetty.home}. This allows for some complex hierarchies
of configuration details.
--download=|
Advanced usage, If the file does not exist at the given
location, download it from the given http URI.
Notes: location is always relative to ${jetty.base}.
you might need to escape the slash "\|" to use
this on some environments.
Properties:
-----------
These are set with a command line like "java -jar start.jar name=value"
and only affect the start mechanism. Some of these are defined in the
default start.config and will not be available if another configuration
file is used. NOTE: Not all properties are listed here:
jetty.home=[directory]
Set the home directory of the jetty distribution.
jetty.base=[directory]
Set the jetty configuration directory. This is where the etc, webapps and start
files will be looked for. If not found in jetty.base, they are looked for in
jetty.home.
Defaults:
---------
Command line arguments can come from any jetty configuration directory
(except ${jetty.home}), such as ${jetty.base} and any added jetty directories
(see --include-jetty-dir=).
The contents of /start.ini and /start.d/*.ini are all used
to build up your command line arguments.
In case of a conflict, the resolution of who wins, will look like this.
1)
2) ${jetty.base}/start.ini
3) ${jetty.base}/start.d/*.ini
4) /start.ini
5) /start.d/*.ini
For more information on startup, see the online documentation at
http://www.eclipse.org/jetty/documentation/