Class StartArgs

java.lang.Object
org.eclipse.jetty.start.StartArgs

public class StartArgs extends Object
The Arguments required to start Jetty.
  • Field Details

    • VERSION

      public static final String VERSION
    • ALL_PARTS

      public static final Set<String> ALL_PARTS
    • ARG_PARTS

      public static final Set<String> ARG_PARTS
    • JETTY_VERSION_KEY

      private static final String JETTY_VERSION_KEY
      See Also:
    • JETTY_TAG_NAME_KEY

      private static final String JETTY_TAG_NAME_KEY
      See Also:
    • JETTY_BUILDNUM_KEY

      private static final String JETTY_BUILDNUM_KEY
      See Also:
    • MAIN_CLASS

      private static final String MAIN_CLASS
      See Also:
    • MODULE_MAIN_CLASS

      private static final String MODULE_MAIN_CLASS
      See Also:
    • baseHome

      private final BaseHome baseHome
    • modules

      private List<String> modules
      List of enabled modules
    • skipFileValidationModules

      private Set<String> skipFileValidationModules
      List of modules to skip [files] section validation
    • sources

      Map<String,List<String>> sources
      Map of enabled modules to the source of where that activation occurred
    • files

      private List<FileArg> files
      List of all active [files] sections from enabled modules
    • classpath

      private Classpath classpath
      List of all active [lib] sections from enabled modules
    • xmls

      private List<Path> xmls
      List of all active [xml] sections from enabled modules
    • jmodAdds

      private Set<String> jmodAdds
      List of all active [jpms] sections for enabled modules
    • jmodPatch

      private Map<String,Set<String>> jmodPatch
    • jmodOpens

      private Map<String,Set<String>> jmodOpens
    • jmodExports

      private Map<String,Set<String>> jmodExports
    • jmodReads

      private Map<String,Set<String>> jmodReads
    • jvmArgs

      private List<String> jvmArgs
      JVM arguments, found via command line and in all active [exec] sections from enabled modules
    • xmlRefs

      private List<String> xmlRefs
      List of all xml references found directly on command line or start.ini
    • propertyFileRefs

      private List<String> propertyFileRefs
      List of all property references found directly on command line or start.ini
    • propertyFiles

      private List<Path> propertyFiles
      List of all property files
    • properties

      private Props properties
    • systemPropertySource

      private Map<String,String> systemPropertySource
    • rawLibs

      private List<String> rawLibs
    • startModules

      private List<String> startModules
      --add-to-start[d]=[module,[module]]
    • moduleGraphFilename

      private String moduleGraphFilename
      --write-module-graph=[filename]
    • allModules

      private Modules allModules
      Collection of all modules
    • run

      private boolean run
      Should the server be run?
    • createFiles

      private boolean createFiles
      Files related args
    • licenseCheckRequired

      private boolean licenseCheckRequired
    • testingMode

      private boolean testingMode
    • help

      private boolean help
    • stopCommand

      private boolean stopCommand
    • listModules

      private List<String> listModules
    • listClasspath

      private boolean listClasspath
    • listConfig

      private boolean listConfig
    • version

      private boolean version
    • dryRun

      private boolean dryRun
    • dryRunParts

      private final Set<String> dryRunParts
    • jpms

      private boolean jpms
    • createStartd

      private boolean createStartd
    • updateIni

      private boolean updateIni
    • mavenBaseUri

      private String mavenBaseUri
    • exec

      private boolean exec
    • execProperties

      private String execProperties
    • approveAllLicenses

      private boolean approveAllLicenses
  • Constructor Details

    • StartArgs

      public StartArgs(BaseHome baseHome)
  • Method Details

    • addFile

      private void addFile(Module module, String uriLocation)
    • addUniqueXmlFile

      private void addUniqueXmlFile(String xmlRef, Path xmlfile) throws IOException
      Throws:
      IOException
    • addUniquePropertyFile

      private void addUniquePropertyFile(String propertyFileRef, Path propertyFile) throws IOException
      Throws:
      IOException
    • dumpActiveXmls

      public void dumpActiveXmls()
    • dumpEnvironment

      public void dumpEnvironment()
    • dumpJvmArgs

      public void dumpJvmArgs()
    • dumpProperties

      public void dumpProperties()
    • dumpProperty

      private void dumpProperty(String key)
    • dumpSystemProperties

      public void dumpSystemProperties()
    • dumpSystemProperty

      private void dumpSystemProperty(String key)
    • ensureSystemPropertySet

      private void ensureSystemPropertySet(String key)
      Ensure that the System Properties are set (if defined as a System property, or start.config property, or start.ini property)
      Parameters:
      key - the key to be sure of
    • expandSystemProperties

      public void expandSystemProperties()
      Expand any command line added --lib lib references.
    • expandLibs

      public void expandLibs() throws IOException
      Expand any command line added --lib lib references.
      Throws:
      IOException - if unable to expand the libraries
    • expandModules

      public void expandModules(List<Module> activeModules) throws IOException
      Build up the Classpath and XML file references based on enabled Module list.
      Parameters:
      activeModules - the active (selected) modules
      Throws:
      IOException - if unable to expand the modules
    • expandJPMS

      void expandJPMS(List<Module> activeModules) throws IOException
      Throws:
      IOException
    • parseJPMSKeyValue

      private void parseJPMSKeyValue(Module module, String line, String directive, boolean valueIsFile, Map<String,Set<String>> output) throws IOException
      Throws:
      IOException
    • getStartModules

      public List<String> getStartModules()
    • getAllModules

      public Modules getAllModules()
    • getClasspath

      public Classpath getClasspath()
    • getEnabledModules

      public List<String> getEnabledModules()
    • getFiles

      public List<FileArg> getFiles()
    • getJvmArgs

      public List<String> getJvmArgs()
    • getMainArgs

      public CommandLineBuilder getMainArgs(Set<String> parts) throws IOException
      Throws:
      IOException
    • getMainClassname

      public String getMainClassname()
    • getMavenLocalRepoDir

      public String getMavenLocalRepoDir()
    • findMavenLocalRepoDir

      public Path findMavenLocalRepoDir()
    • getModuleGraphFilename

      public String getModuleGraphFilename()
    • getProperties

      public Props getProperties()
    • getSkipFileValidationModules

      public Set<String> getSkipFileValidationModules()
    • getSources

      public List<String> getSources(String module)
    • getXmlFiles

      public List<Path> getXmlFiles()
    • hasJvmArgs

      public boolean hasJvmArgs()
    • hasSystemProperties

      public boolean hasSystemProperties()
    • isApproveAllLicenses

      public boolean isApproveAllLicenses()
    • isCreateFiles

      public boolean isCreateFiles()
    • isJPMS

      public boolean isJPMS()
    • isDryRun

      public boolean isDryRun()
    • getDryRunParts

      public Set<String> getDryRunParts()
    • isExec

      public boolean isExec()
    • isLicenseCheckRequired

      public boolean isLicenseCheckRequired()
    • isNormalMainClass

      public boolean isNormalMainClass()
    • isHelp

      public boolean isHelp()
    • isListClasspath

      public boolean isListClasspath()
    • isListConfig

      public boolean isListConfig()
    • getListModules

      public List<String> getListModules()
    • isRun

      public boolean isRun()
    • isStopCommand

      public boolean isStopCommand()
    • isTestingModeEnabled

      public boolean isTestingModeEnabled()
    • isVersion

      public boolean isVersion()
    • isCreateStartd

      public boolean isCreateStartd()
    • isUpdateIni

      public boolean isUpdateIni()
    • getMavenBaseUri

      public String getMavenBaseUri()
    • parse

      public void parse(ConfigSources sources)
    • parse

      public void parse(String rawarg, String source)
      Parse a single line of argument.
      Parameters:
      rawarg - the raw argument to parse
      source - the origin of this line of argument
    • processSystemProperty

      protected Props.Prop processSystemProperty(String key, String value, String source)
    • processAndSetProperty

      protected void processAndSetProperty(String key, String value, String source)
    • enableModules

      private void enableModules(String source, List<String> moduleNames)
    • resolveExtraXmls

      public void resolveExtraXmls() throws IOException
      Throws:
      IOException
    • resolvePropertyFiles

      public void resolvePropertyFiles() throws IOException
      Throws:
      IOException
    • setAllModules

      public void setAllModules(Modules allModules)
    • setProperty

      public void setProperty(String key, String value, String source)
    • isMethodAvailable

      private boolean isMethodAvailable(Class<?> clazz, String methodName, Class<?>[] params)
    • setRun

      public void setRun(boolean run)
    • toString

      public String toString()
      Overrides:
      toString in class Object