All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.jetty.start.usage.txt Maven / Gradle / Ivy

There is a newer version: 12.1.0.alpha0
Show newest version
Usage:

$ java -jar $JETTY_HOME/start.jar [command] [options...]

Commands can be of two types: report commands or configuration commands.
Commands execute and then exit the JVM.
Options can be specified with or without commands.
When no command is specified, Jetty is started with the given options.

Report Commands:
----------------

  --help
                   Prints this help / usage information.

  --version
                   Prints the version information for Jetty and
                   dependent jars, then exits.

  --list-classpath
                   Prints the class-path (or module-path) information that
                   will be used to start Jetty.

  --list-config
                   Lists the resolved configuration that will be used to
                   start Jetty.
                   Output includes:
                     o  Enabled Jetty modules
                     o  Java environment
                     o  Jetty environment
                     o  Config file search order
                     o  JVM arguments
                     o  System properties
                     o  Properties
                     o  Java class-path or module-path
                     o  XML configuration files

  --list-modules
                   Lists the modules defined in ${jetty.base}/modules/*.mod
                   and then in ${jetty.home}/modules/*.mod.

  --list-modules=(,)*
                   Lists the modules by tag. Use '*' for all tags.
                   Prefix a tag with '-' to exclude the tag.
                   The special tag "internal" is always excluded unless it is
                   explicitly included.

  --list-all-modules
                   Lists all modules.

  --show-modules=(,)*
                   Shows the detail of the listed modules, including
                   dependencies, tags, libraries and XMLs.

  --stop
                   Sends a stop signal to the running Jetty instance.
                   The running Jetty instance must have been started with a
                   stop.port= property and the --stop command must
                   be executed with the same property.

  --dry-run
                   Prints the command line that start.jar generates,
                   in a format usable by a POSIX compliant shell, then exits.
                   This may be used to generate command lines into scripts:
                     $ java -jar start.jar --dry-run > jetty.sh

  --dry-run=(,)*
                   Prints specific parts of the command line in a format usable by
                   a POSIX compliant shell. The parts are:
                     o  "java" - the JVM to run
                     o  "opts" - the JVM options (e.g. -D, -X and -XX flags)
                     o  "path" - the JVM class-path and/or the JPMS module-path
                     o  "main" - the main class to run
                     o  "args" - the arguments passed to the main class
                     o  "envs" - the generated XML files to create the environments

Configure Commands:
-------------------

  --add-modules=(,)*
                   Adds the given modules to the list of modules enabled at
                   when Jetty starts.
                   Transitive dependencies are followed and dependent
                   modules may also explicitly added.
                   Modules are added by creating an *.ini file in the
                   ${jetty.base}/start.d/ directory.
                   The *.ini file contains the --module option that enables
                   the module, and any other option defined in the module's
                   [ini-template] section.
                   If the *.ini file specifies properties, these may be
                   overridden by specifying the same properties on the
                   command line.

                   If a module is transitively enabled, its *.ini file will
                   not be generated.
                   To generate the *.ini file, the module must be explicitly
                   listed in the --add-modules=... command.

                   This option replaces the deprecated --add-to-start and
                   --add-to-startd commands.

  --create-start-d
                   Creates a ${jetty.base}/start.d directory.
                   If the ${jetty.base}/start.ini file exists, then it is
                   moved into the ${jetty.base}/start.d/ directory.
                   Using a ${jetty.base}/start.d/ directory is the default and
                   this option is only needed to either force the creation of
                   the ${jetty.base}/start.d/ directory, or to move a
                   ${jetty.base}/start.ini file to ${jetty.base}/start.d/.

  --create-start-ini
                   Creates a ${jetty.base}/start.ini file.
                   If a ${jetty.base}/start.d/ directory exists, then all
                   the contained *.ini files are concatenated into the
                   ${jetty.base}/start.ini file.

  --update-ini
                   Scans all the ${jetty.base}/start.d/*.ini files and updates
                   any property with values specified on the command line.
                   For example:
                     $ java -jar ${jetty.host}/start.jar --update-ini jetty.http.port=8888

  --create-files
                   Creates any missing files that are required by enabled
                   modules, as specified in their [files] section.
                   This may download a file from the network if a HTTP URI
                   is specified in the [files] section.

  --write-module-graph=
                   Creates a graphviz *.dot file of the module graph as it
                   is configured for the current ${jetty.base}.
                   See https://graphviz.org/ for details on how to post-process
                   this file into the output best suited for your needs.

Options:
--------

  --env=
                   Sets the environment which will apply to all subsequent libraries,
                   properties and XML files.

  --modules=(,)*
                   Enables a module for this execution.
                   To enable a module for all future executions, use the
                   --add-modules command.
                   Note: this option is used in the ${jetty.base}/start.ini
                   file or in ${jetty.base}/start.d/*.ini files created by
                   the --add-modules command.

  --libs=
                   Adds the specified class-path entries to the the server
                   class-path; or module-path; or environment classpath if
                   there has been a prior --env argument.

  --files=|
  --download=|
                   Downloads a file from the given URI, if it does
                   not already exist at the given location.
                   Note: the location is always relative to ${jetty.base}.
                   You might need to escape the pipe "\|" to use it in
                   some shell environments.
                   Supported schemes:
                     http:     download from http (unsecure) website
                     https:    download from https (secure) website
                     maven:    download from maven repository system
                               first checking local repository
                               see `maven.local.repo` field below
                               then global repository
                               see `maven.repo.uri` field below

                     basehome: download relative path from active
                               configured jetty dirs (eg: `${jetty.base}`
                               and any `--include-jetty-dir` and finally
                               checking the `${jetty.home}`)

  --exec
                   Executes the generated command line in a forked JVM
                   (see the --dry-run command).
                   This can be used when ${jetty.base}/start.d/*.ini files
                   contain -D, -X or -XX arguments, but creates an extra
                   JVM process.

  --exec-properties=
                   Assigns a fixed name to the file used to transfer
                   properties to the sub process. This allows the
                   generated properties file to be saved and reused.
                   Without this option, a temporary file is used.

  --commands=
                   Uses each line of the specified file as arguments on the
                   JVM command line.

  --jpms
                   Starts Jetty in JPMS mode in a forked JVM (see also the
                   --dry-run command).
                   The library *.jar files are set on the forked JVM module-path
                   (rather than the forked JVM class-path), while directories
                   are set on the forked JVM class-path.
                   The main class is specified with the JPMS option
                   --module /.

  --debug
                   Enables debug output of the startup execution.
                   Note: this does not setup debug logging for Jetty itself,
                   only for the startup execution.
                   If you want debug logging for Jetty, configure one of the
                   available logging modules using the --add-modules command.

  --start-log-file=
                   A filename, relative to ${jetty.base}, where all startup
                   output will be sent.  This is useful for capturing startup
                   issues when the Jetty logging module has not yet started
                   due to configuration errors.

  --allow-insecure-http-downloads
                   Allow the use of insecure `http://` scheme for content download.

  --approve-all-licenses
                   Approves all license questions from modules that have
                   particular license requirements.
                   Useful for enabling modules from a script, so that it
                   does not require user interaction.

  --skip-create-files=(,)*
  --skip-file-validation=(,)*
                   Disables the creation of files as specified by the
                   [files] section of the specified modules.
                   Useful if a logging module specifies a *.properties
                   config file, but you want to use that module with an
                   *.xml config file instead.

  --add-config-dir=
  --include-jetty-dir=
                   Includes the specified directory as a configuration source.
                   This directory behaves similarly to ${jetty.base} but sits
                   at a layer between ${jetty.home} and ${jetty.base}.
                   Useful when you want to apply a common "corporate"
                   configuration to all specific ${jetty.base} directories
                   without having to modify ${jetty.home}.

  -D=
                   Specifies a system property, as well as a start property.
                   Note: this is a program argument that is interpreted and
                   added to the existing JVM system properties.

  .xml
                   Specifies a Jetty XML file relative to ${jetty.base}.
                   This file is in addition to the Jetty XML files resolved
                   from the [xml] sections of the enabled modules.
                   If there has been a prior --env argument, the XML will be
                   executed within that environment

  =
                   Specifies a property value that overrides the same
                   property defined in a ${jetty.base}/start.d/*.ini file,
                   or in the [ini] section of a *.mod file.

                   =
                     Sets the property value unconditionally.
                   +=
                     Appends the given value to the existing value.
                   ?=
                     Sets the property value only if it is not already set.

                   If there has been a prior --env argument, then the property is
                   set only for the current environment, otherwise it is set for
                   the whole server.

  .properties
                   Specifies a file of property assignments that overrides the same
                   property defined in a ${jetty.base}/start.d/*.ini file,
                   or in the [ini] section of a *.mod file.
                   If there has been a prior --env argument, then the property is
                   set only for the current environment, otherwise it is set for
                   the whole server.

  jetty.home=
                   Sets the ${jetty.home} directory.
                   By default it is resolved from the start.jar file path.

  jetty.base=
                   Sets the ${jetty.base} directory.
                   By default it is resolved from the current directory path.

  stop.host=
                   Used with the --stop command.
                   Specifies the host where the Jetty server to stop is
                   running (defaults to 127.0.0.1).

  stop.port=
                   Used with the --stop command.
                   Specifies the port to use to contact the Jetty server
                   to stop.

  stop.key=
                   Used with the --stop command.
                   The passphrase required to stop the Jetty server.

  stop.wait=
                   Used with the --stop command.
                   The time, in seconds, to wait for confirmation that the
                   running Jetty server has stopped.
                   If not specified, the stopper will not wait.

  maven.local.repo=
                   The maven local repository directory to find
                   and store maven artifacts.
                   Defaults to:
                     1. Environment variable `JETTY_MAVEN_LOCAL_REPO`
                     2. Environment variable `MAVEN_LOCAL_REPO`
                     3. Directory ${home}/.m2/repository

  maven.repo.uri=
                   The base URL to use to download Maven dependencies.
                   Defaults to: https://repo1.maven.org/maven2/.




© 2015 - 2025 Weber Informatics LLC | Privacy Policy