Skip to content

Instantly share code, notes, and snippets.

@Jerry-Fix
Last active August 29, 2015 14:00
Show Gist options
  • Select an option

  • Save Jerry-Fix/11364406 to your computer and use it in GitHub Desktop.

Select an option

Save Jerry-Fix/11364406 to your computer and use it in GitHub Desktop.
--list-config/--list-classpath/--help/--list-modules
[jaseywang@unode-test1 jetty]$ java -jar start.jar --list-classpath
Jetty Server Classpath:
-----------------------
Version Information on 35 entries in the classpath.
Note: order presented here is how they would appear on the classpath.
changes to the --module=name command line options will be reflected here.
0: (dir) | ${jetty.home}/resources
1: 3.1.0 | ${jetty.home}/lib/servlet-api-3.1.jar
2: 3.1.0.M0 | ${jetty.home}/lib/jetty-schemas-3.1.jar
3: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-http-9.1.3.v20140225.jar
4: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-server-9.1.3.v20140225.jar
5: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-xml-9.1.3.v20140225.jar
6: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-util-9.1.3.v20140225.jar
7: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-io-9.1.3.v20140225.jar
8: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-jndi-9.1.3.v20140225.jar
9: 1.4.1.v201005082020 | ${jetty.home}/lib/jndi/javax.mail.glassfish-1.4.1.v201005082020.jar
10: 1.2 | ${jetty.home}/lib/jndi/javax.transaction-api-1.2.jar
11: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-security-9.1.3.v20140225.jar
12: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-servlet-9.1.3.v20140225.jar
13: 3.0.0 | ${jetty.home}/lib/jsp/javax.el-3.0.0.jar
14: 1.2.2 | ${jetty.home}/lib/jsp/javax.servlet.jsp.jstl-1.2.2.jar
15: 2.3.2 | ${jetty.home}/lib/jsp/javax.servlet.jsp-2.3.2.jar
16: 2.3.1 | ${jetty.home}/lib/jsp/javax.servlet.jsp-api-2.3.1.jar
17: 2.3.3 | ${jetty.home}/lib/jsp/jetty-jsp-jdt-2.3.3.jar
18: 3.8.2.v20130121-145325 | ${jetty.home}/lib/jsp/org.eclipse.jdt.core-3.8.2.v20130121.jar
19: 1.2.0.v201105211821 | ${jetty.home}/lib/jsp/org.eclipse.jetty.orbit.javax.servlet.jsp.jstl-1.2.0.v201105211821.jar
20: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-plus-9.1.3.v20140225.jar
21: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-webapp-9.1.3.v20140225.jar
22: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-annotations-9.1.3.v20140225.jar
23: 4.1 | ${jetty.home}/lib/annotations/asm-4.1.jar
24: 4.1 | ${jetty.home}/lib/annotations/asm-commons-4.1.jar
25: 1.2 | ${jetty.home}/lib/annotations/javax.annotation-api-1.2.jar
26: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-deploy-9.1.3.v20140225.jar
27: 1.0 | ${jetty.home}/lib/websocket/javax.websocket-api-1.0.jar
28: 9.1.3.v20140225 | ${jetty.home}/lib/websocket/javax-websocket-client-impl-9.1.3.v20140225.jar
29: 9.1.3.v20140225 | ${jetty.home}/lib/websocket/javax-websocket-server-impl-9.1.3.v20140225.jar
30: 9.1.3.v20140225 | ${jetty.home}/lib/websocket/websocket-api-9.1.3.v20140225.jar
31: 9.1.3.v20140225 | ${jetty.home}/lib/websocket/websocket-client-9.1.3.v20140225.jar
32: 9.1.3.v20140225 | ${jetty.home}/lib/websocket/websocket-common-9.1.3.v20140225.jar
33: 9.1.3.v20140225 | ${jetty.home}/lib/websocket/websocket-server-9.1.3.v20140225.jar
34: 9.1.3.v20140225 | ${jetty.home}/lib/websocket/websocket-servlet-9.1.3.v20140225.jar
[jaseywang@unode-test1 jetty]$ java -jar start.jar --list-config
Java Environment:
-----------------
java.home = /usr/java/jdk1.7.0_55/jre
java.vm.vendor = Oracle Corporation
java.vm.version = 24.55-b03
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.vm.info = mixed mode
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.7.0_55-b13
java.io.tmpdir = /tmp
user.dir = /home/jaseywang/KeyBox-jetty/jetty
user.language = en
user.country = US
Jetty Environment:
-----------------
jetty.home = /home/jaseywang/KeyBox-jetty/jetty
jetty.base = /home/jaseywang/KeyBox-jetty/jetty
jetty.version = 9.1.3.v20140225
JVM Arguments:
--------------
(no jvm args specified)
System Properties:
------------------
jetty.base = /home/jaseywang/KeyBox-jetty/jetty
jetty.home = /home/jaseywang/KeyBox-jetty/jetty
Properties:
-----------
jetty.dump.start = false
jetty.dump.stop = false
jetty.output.buffer.size = 32768
jetty.request.header.size = 8192
jetty.response.header.size = 8192
jetty.send.date.header = false
jetty.send.server.version = true
threads.max = 200
threads.min = 10
threads.timeout = 60000
Jetty Server Classpath:
-----------------------
Version Information on 35 entries in the classpath.
Note: order presented here is how they would appear on the classpath.
changes to the --module=name command line options will be reflected here.
0: (dir) | ${jetty.home}/resources
1: 3.1.0 | ${jetty.home}/lib/servlet-api-3.1.jar
2: 3.1.0.M0 | ${jetty.home}/lib/jetty-schemas-3.1.jar
3: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-http-9.1.3.v20140225.jar
4: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-server-9.1.3.v20140225.jar
5: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-xml-9.1.3.v20140225.jar
6: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-util-9.1.3.v20140225.jar
7: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-io-9.1.3.v20140225.jar
8: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-jndi-9.1.3.v20140225.jar
9: 1.4.1.v201005082020 | ${jetty.home}/lib/jndi/javax.mail.glassfish-1.4.1.v201005082020.jar
10: 1.2 | ${jetty.home}/lib/jndi/javax.transaction-api-1.2.jar
11: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-security-9.1.3.v20140225.jar
12: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-servlet-9.1.3.v20140225.jar
13: 3.0.0 | ${jetty.home}/lib/jsp/javax.el-3.0.0.jar
14: 1.2.2 | ${jetty.home}/lib/jsp/javax.servlet.jsp.jstl-1.2.2.jar
15: 2.3.2 | ${jetty.home}/lib/jsp/javax.servlet.jsp-2.3.2.jar
16: 2.3.1 | ${jetty.home}/lib/jsp/javax.servlet.jsp-api-2.3.1.jar
17: 2.3.3 | ${jetty.home}/lib/jsp/jetty-jsp-jdt-2.3.3.jar
18: 3.8.2.v20130121-145325 | ${jetty.home}/lib/jsp/org.eclipse.jdt.core-3.8.2.v20130121.jar
19: 1.2.0.v201105211821 | ${jetty.home}/lib/jsp/org.eclipse.jetty.orbit.javax.servlet.jsp.jstl-1.2.0.v201105211821.jar
20: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-plus-9.1.3.v20140225.jar
21: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-webapp-9.1.3.v20140225.jar
22: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-annotations-9.1.3.v20140225.jar
23: 4.1 | ${jetty.home}/lib/annotations/asm-4.1.jar
24: 4.1 | ${jetty.home}/lib/annotations/asm-commons-4.1.jar
25: 1.2 | ${jetty.home}/lib/annotations/javax.annotation-api-1.2.jar
26: 9.1.3.v20140225 | ${jetty.home}/lib/jetty-deploy-9.1.3.v20140225.jar
27: 1.0 | ${jetty.home}/lib/websocket/javax.websocket-api-1.0.jar
28: 9.1.3.v20140225 | ${jetty.home}/lib/websocket/javax-websocket-client-impl-9.1.3.v20140225.jar
29: 9.1.3.v20140225 | ${jetty.home}/lib/websocket/javax-websocket-server-impl-9.1.3.v20140225.jar
30: 9.1.3.v20140225 | ${jetty.home}/lib/websocket/websocket-api-9.1.3.v20140225.jar
31: 9.1.3.v20140225 | ${jetty.home}/lib/websocket/websocket-client-9.1.3.v20140225.jar
32: 9.1.3.v20140225 | ${jetty.home}/lib/websocket/websocket-common-9.1.3.v20140225.jar
33: 9.1.3.v20140225 | ${jetty.home}/lib/websocket/websocket-server-9.1.3.v20140225.jar
34: 9.1.3.v20140225 | ${jetty.home}/lib/websocket/websocket-servlet-9.1.3.v20140225.jar
Jetty Active XMLs:
------------------
${jetty.home}/etc/jetty.xml
${jetty.home}/etc/jetty-ssl.xml
${jetty.home}/etc/jetty-https.xml
${jetty.home}/etc/jetty-plus.xml
${jetty.home}/etc/jetty-annotations.xml
${jetty.home}/etc/jetty-deploy.xml
[jaseywang@unode-test1 jetty]$ java -jar start.jar --help
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=<filename>
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=<modulename>(,<modulename>)*
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=<modulename>(,<modulename>)*
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=<modulename>(,<modulename>)*
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=<filename>
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=<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:
------------------
--download=<http-uri>:<location>
Advanced usage, If the file does not exist at the given
location, download it from the given http URI.
Note: location is always relative to ${jetty.base}
--lib=<classpath>
Add arbitrary classpath entries to the the server classpath.
System Properties:
------------------
These are set with a command line like "java -Dname=value ..." and are
accessible via the java.lang.System#getProperty(String) API.
Some key system properties are:
org.eclipse.jetty.util.log.class=[class]
A Low Level Jetty Logger Implementation to use
(default: org.eclipse.jetty.util.log.Slf4jLog)
[name|hierarchy].LEVEL=[loglevel]
Change loglevel for the stderr and javautil Loggers. Slf4j
and other loggers must be separately configured for debug.
For example: Dorg.eclipse.jetty.LEVEL=DEBUG
(default: INFO)
org.eclipse.jetty.util.log.IGNORED=[boolean]
Ignored exceptions are logged, independent of DEBUG settings
(default: false)
org.eclipse.jetty.util.log.SOURCE=[boolean]
The source location of logs is logged in the stderr Logger.
(default: false)
com.sun.management.jmxremote
Enable remote JMX management in Sun JVMS.
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:
---------
A ${jetty.base}/start.ini file and/or ${jetty.base|/start.d/*.ini files may be
used to specify default arguments to start.jar. In case of a conflict between
the command line, and ini files, the command line will win.
[jaseywang@unode-test1 jetty]$ java -jar start.jar --list-modules
Jetty All Available Modules:
----------------------------
+ Module: annotations
Parent: plus
LIB: lib/jetty-annotations-${jetty.version}.jar
LIB: lib/annotations/*.jar
XML: etc/jetty-annotations.xml
Enabled: <via transitive reference>
- Module: client
LIB: lib/jetty-client-${jetty.version}.jar
Enabled: <not enabled in this configuration>
- Module: continuation
LIB: lib/jetty-continuation-${jetty.version}.jar
Enabled: <not enabled in this configuration>
- Module: debug
Parent: server
XML: etc/jetty-debug.xml
Enabled: <not enabled in this configuration>
* Module: deploy
Parent: webapp
LIB: lib/jetty-deploy-${jetty.version}.jar
XML: etc/jetty-deploy.xml
Enabled: <via> ${jetty.home}/start.ini
* Module: ext
LIB: regex:lib/ext/.*\.jar$
Enabled: <via> ${jetty.home}/start.ini
- Module: http
Parent: server
XML: etc/jetty-http.xml
Enabled: <not enabled in this configuration>
* Module: https
Parent: ssl
XML: etc/jetty-https.xml
Enabled: <via> ${jetty.home}/start.ini
- Module: ipaccess
Parent: server
XML: etc/jetty-ipaccess.xml
Enabled: <not enabled in this configuration>
- Module: jaas
Parent: server
LIB: lib/jetty-jaas-${jetty.version}.jar
XML: etc/jetty-jaas.xml
Enabled: <not enabled in this configuration>
- Module: jaspi
Parent: security
LIB: lib/jetty-jaspi-${jetty.version}.jar
LIB: lib/jaspi/*.jar
Enabled: <not enabled in this configuration>
- Module: jmx
LIB: lib/jetty-jmx-${jetty.version}.jar
XML: etc/jetty-jmx.xml
Enabled: <not enabled in this configuration>
- Module: jmx-remote
Parent: jmx
XML: etc/jetty-jmx-remote.xml
Enabled: <not enabled in this configuration>
+ Module: jndi
Parent: server
LIB: lib/jetty-jndi-${jetty.version}.jar
LIB: lib/jndi/*.jar
Enabled: <via transitive reference>
* Module: jsp
Parent: servlet
LIB: lib/jsp/*.jar
Enabled: <via> ${jetty.home}/start.ini
- Module: jvm
Enabled: <not enabled in this configuration>
- Module: logging
XML: etc/jetty-logging.xml
Enabled: <not enabled in this configuration>
- Module: lowresources
Parent: server
XML: etc/jetty-lowresources.xml
Enabled: <not enabled in this configuration>
- Module: monitor
Parent: client
Parent: server
LIB: lib/monitor/jetty-monitor-${jetty.version}.jar
XML: etc/jetty-monitor.xml
Enabled: <not enabled in this configuration>
- Module: npn
Parent: npn/npn-1.7.0_55
Enabled: <not enabled in this configuration>
+ Module: plus
Parent: server
Parent: security
Parent: jndi
LIB: lib/jetty-plus-${jetty.version}.jar
XML: etc/jetty-plus.xml
Enabled: <via transitive reference>
- Module: proxy
Parent: client
Parent: servlet
LIB: lib/jetty-proxy-${jetty.version}.jar
XML: etc/jetty-proxy.xml
Enabled: <not enabled in this configuration>
- Module: requestlog
Parent: server
XML: etc/jetty-requestlog.xml
Enabled: <not enabled in this configuration>
* Module: resources
LIB: resources
Enabled: <via> ${jetty.home}/start.ini
- Module: rewrite
Parent: server
LIB: lib/jetty-rewrite-${jetty.version}.jar
XML: etc/jetty-rewrite.xml
Enabled: <not enabled in this configuration>
+ Module: security
Parent: server
LIB: lib/jetty-security-${jetty.version}.jar
Enabled: <via transitive reference>
* Module: server
LIB: lib/servlet-api-3.1.jar
LIB: lib/jetty-schemas-3.1.jar
LIB: lib/jetty-http-${jetty.version}.jar
LIB: lib/jetty-server-${jetty.version}.jar
LIB: lib/jetty-xml-${jetty.version}.jar
LIB: lib/jetty-util-${jetty.version}.jar
LIB: lib/jetty-io-${jetty.version}.jar
XML: etc/jetty.xml
Enabled: <via> ${jetty.home}/start.ini
+ Module: servlet
Parent: server
LIB: lib/jetty-servlet-${jetty.version}.jar
Enabled: <via transitive reference>
- Module: servlets
Parent: servlet
LIB: lib/jetty-servlets-${jetty.version}.jar
Enabled: <not enabled in this configuration>
- Module: setuid
Parent: server
LIB: lib/setuid/jetty-setuid-java-1.0.1.jar
XML: etc/jetty-setuid.xml
Enabled: <not enabled in this configuration>
- Module: spdy
Parent: ssl
Parent: npn
LIB: lib/spdy/*.jar
XML: etc/jetty-ssl.xml
XML: etc/jetty-spdy.xml
Enabled: <not enabled in this configuration>
+ Module: ssl
Parent: server
XML: etc/jetty-ssl.xml
Enabled: <via transitive reference>
- Module: stats
Parent: server
XML: etc/jetty-stats.xml
Enabled: <not enabled in this configuration>
+ Module: webapp
Parent: security
Parent: servlet
LIB: lib/jetty-webapp-${jetty.version}.jar
Enabled: <via transitive reference>
* Module: websocket
Parent: annotations
LIB: lib/websocket/*.jar
Enabled: <via> ${jetty.home}/start.ini
- Module: xinetd
Parent: server
XML: etc/jetty-xinetd.xml
Enabled: <not enabled in this configuration>
Jetty Active Module Tree:
-------------------------
+ Module: ext [enabled]
+ Module: resources [enabled]
+ Module: server [enabled]
+ Module: jndi [transitive]
+ Module: security [transitive]
+ Module: servlet [transitive]
+ Module: ssl [transitive]
+ Module: https [enabled]
+ Module: jsp [enabled]
+ Module: plus [transitive]
+ Module: webapp [transitive]
+ Module: annotations [transitive]
+ Module: deploy [enabled]
+ Module: websocket [enabled]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment