Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 0817b46738c137bd8447e5d948b403eefd8afeea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
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:
------------------

  --lib=<classpath>
                   Add arbitrary classpath entries to the the server classpath.
                   
  --include-jetty-dir=<path>
                   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=<http-uri>|<location>
                   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=<path>).  
  The contents of <path>/start.ini and <path>/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) <command-line itself>
    2) ${jetty.base}/start.ini
    3) ${jetty.base}/start.d/*.ini
    4) <jetty-dir>/start.ini
    5) <jetty-dir>/start.d/*.ini

For more information on startup, see the online documentation at
    http://www.eclipse.org/jetty/documentation/

Back to the top