Package: org.gradle.api.plugins.jetty

## [Java] Class JettyRun

- org.gradle.api.plugins.jetty.JettyRun

- Deploys an exploded web application to an embedded Jetty web container. Does not require that the web application be assembled into a war, saving time during the development cycle.

  Once started, the web container can be configured to run continuously, scanning for changes in the project and automatically performing a hot redeploy when necessary. This allows the developer to concentrate on coding changes to the project using their IDE of choice and have those changes immediately and transparently reflected in the running web container, eliminating development time that is wasted on rebuilding, reassembling and redeploying.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class AbstractJettyRunTask` | `PORT_SYSPROPERTY, consoleScanner, reload, scannerListeners`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `applyJettyXml()`
    `void` | `configureScanner()`
    `void` | `configureWebApplication()`
    `JettyPluginServer` | `createServer()`
    `void` | `finishConfigurationBeforeStart()`
    `List<File>` | `getClassPathFiles()`
    `FileCollection` | `getClasspath()` Returns the classpath for the web application.
    `ContextHandler[]` | `getConfiguredContextHandlers()`
    `Set<File>` | `getExtraScanTargets()`
    `File` | `getJettyEnvXml()`
    `File` | `getJettyEnvXmlFile()`
    `ScanTargetPattern[]` | `getScanTargetPatterns()`
    `File[]` | `getScanTargets()`
    `File` | `getWebAppSourceDirectory()` Returns the directory containing the web application source files.
    `File` | `getWebXml()` Returns the `web.xml` file to use.
    `void` | `restartWebApp(boolean reconfigureScanner)`
    `void` | `setClassPathFiles(List<File> classPathFiles)`
    `void` | `setClasspath(FileCollection classpath)` Set the classpath for the web application.
    `void` | `setContextHandlers(ContextHandler[] contextHandlers)`
    `void` | `setExtraScanTargets(Iterable<File> extraScanTargets)`
    `void` | `setJettyEnvXml(File jettyEnvXml)`
    `void` | `setJettyEnvXmlFile(File jettyEnvXmlFile)`
    `void` | `setScanTargetPatterns(ScanTargetPattern[] scanTargetPatterns)`
    `void` | `setScanTargets(File[] scanTargets)`
    `void` | `setWebAppSourceDirectory(File webAppSourceDirectory)`
    `void` | `setWebXml(File webXml)`
    `void` | `validateConfiguration()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractJettyRunTask` | `applyJettyXml, configureScanner, configureWebApplication, createServer, findJettyWebXmlFile, finishConfigurationBeforeStart, getAdditionalRuntimeJars, getConnectors, getContextPath, getHttpPort, getJettyConfig, getOverrideWebXml, getReload, getRequestLog, getScanIntervalSeconds, getScanner, getScannerListeners, getServer, getStopKey, getStopPort, getUserRealms, getWebAppConfig, getWebDefaultXml, isDaemon, restartWebApp, setAdditionalRuntimeJars, setConnectors, setContextPath, setDaemon, setHttpPort, setJettyConfig, setOverrideWebXml, setReload, setRequestLog, setScanIntervalSeconds, setScannerListeners, setServer, setStopKey, setStopPort, setUserRealms, setWebAppConfig, setWebDefaultXml, start, startConsoleScanner, startJetty, startJettyInternal, validateConfiguration`

- - ### Method Detail

    - #### public void applyJettyXml()

    - #### public void configureScanner()

    - #### public void configureWebApplication()

    - #### public JettyPluginServer createServer()

    - #### public void finishConfigurationBeforeStart()

    - #### public List<File> getClassPathFiles()

    - #### @InputFiles public FileCollection getClasspath()

      Returns the classpath for the web application.

    - #### public ContextHandler[] getConfiguredContextHandlers()

    - #### public Set<File> getExtraScanTargets()

    - #### @InputFile @Optional public File getJettyEnvXml()

    - #### @InputFile @Optional public File getJettyEnvXmlFile()

    - #### public ScanTargetPattern[] getScanTargetPatterns()

    - #### public File[] getScanTargets()

    - #### @InputDirectory public File getWebAppSourceDirectory()

      Returns the directory containing the web application source files.

    - #### public File getWebXml()

      Returns the `web.xml` file to use. When `null`, no `web.xml` file is used.

    - #### public void restartWebApp(boolean reconfigureScanner)

    - #### public void setClassPathFiles(List<File> classPathFiles)

    - #### public void setClasspath(FileCollection classpath)

      Set the classpath for the web application.

    - #### public void setContextHandlers(ContextHandler[] contextHandlers)

    - #### public void setExtraScanTargets(Iterable<File> extraScanTargets)

    - #### public void setJettyEnvXml(File jettyEnvXml)

    - #### public void setJettyEnvXmlFile(File jettyEnvXmlFile)

    - #### public void setScanTargetPatterns(ScanTargetPattern[] scanTargetPatterns)

    - #### public void setScanTargets(File[] scanTargets)

    - #### public void setWebAppSourceDirectory(File webAppSourceDirectory)

    - #### public void setWebXml(File webXml)

    - #### public void validateConfiguration()