org.gradle.api.plugins.jetty

## Class AbstractJettyRunTask

- java.lang.Object
- - org.gradle.api.internal.AbstractTask
  - - org.gradle.api.DefaultTask
    - - org.gradle.api.internal.ConventionTask
      - - org.gradle.api.plugins.jetty.AbstractJettyRunTask

- All Implemented Interfaces:
    Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, ExtensionAware, Task, org.gradle.util.Configurable<Task>
  Direct Known Subclasses:
    JettyRun, JettyRunWar

  Deprecated.
  The Jetty plugin has been deprecated

      @Deprecated
      public abstract class AbstractJettyRunTask
      extends org.gradle.api.internal.ConventionTask

  Base class for all tasks which deploy a web application to an embedded Jetty web container.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.gradle.api.Task

      `Task.Namer`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Thread` | `consoleScanner` Deprecated. A scanner to check ENTER hits on the console.
    `static String` | `PORT_SYSPROPERTY` Deprecated.
    `protected String` | `reload` Deprecated.
    `protected List<org.mortbay.util.Scanner.Listener>` | `scannerListeners` Deprecated. List of Listeners for the scanner.

    - ### Fields inherited from interface org.gradle.api.Task

      `TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractJettyRunTask()` Deprecated.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `applyJettyXml()` Deprecated.
    `abstract void` | `configureScanner()` Deprecated.
    `void` | `configureWebApplication()` Deprecated. Subclasses should invoke this to setup basic info on the webapp.
    `abstract org.gradle.api.plugins.jetty.internal.JettyPluginServer` | `createServer()` Deprecated. create a proxy that wraps a particular jetty version Server object.
    `File` | `findJettyWebXmlFile(File webInfDir)` Deprecated. Try and find a jetty-web.xml file, using some historical naming conventions if necessary.
    `abstract void` | `finishConfigurationBeforeStart()` Deprecated.
    `Iterable<File>` | `getAdditionalRuntimeJars()` Deprecated. Returns the classpath to make available to the web application.
    `org.mortbay.jetty.Connector[]` | `getConnectors()` Deprecated.
    `String` | `getContextPath()` Deprecated. Returns the context path to use to deploy the web application.
    `Integer` | `getHttpPort()` Deprecated. Returns the TCP port for Jetty to listen on for incoming HTTP requests.
    `File` | `getJettyConfig()` Deprecated. Returns the jetty configuration file to use.
    `File` | `getOverrideWebXml()` Deprecated.
    `String` | `getReload()` Deprecated. Returns the reload mode, which is either `"automatic"` or `"manual"`.
    `org.mortbay.jetty.RequestLog` | `getRequestLog()` Deprecated.
    `int` | `getScanIntervalSeconds()` Deprecated. Returns the interval in seconds between scanning the web app for file changes.
    `org.mortbay.util.Scanner` | `getScanner()` Deprecated.
    `List<org.mortbay.util.Scanner.Listener>` | `getScannerListeners()` Deprecated.
    `org.gradle.api.plugins.jetty.internal.JettyPluginServer` | `getServer()` Deprecated.
    `String` | `getStopKey()` Deprecated. Returns the key to use to stop Jetty.
    `Integer` | `getStopPort()` Deprecated. Returns the TCP port for Jetty to listen on for stop requests.
    `org.mortbay.jetty.security.UserRealm[]` | `getUserRealms()` Deprecated.
    `org.gradle.api.plugins.jetty.internal.JettyPluginWebAppContext` | `getWebAppConfig()` Deprecated.
    `File` | `getWebDefaultXml()` Deprecated.
    `boolean` | `isDaemon()` Deprecated. Specifies whether the Jetty server should run in the background.
    `abstract void` | `restartWebApp(boolean reconfigureScanner)` Deprecated.
    `void` | `setAdditionalRuntimeJars(Iterable<File> additionalRuntimeJars)` Deprecated.
    `void` | `setConnectors(org.mortbay.jetty.Connector[] connectors)` Deprecated.
    `void` | `setContextPath(String contextPath)` Deprecated.
    `void` | `setDaemon(boolean daemon)` Deprecated.
    `void` | `setHttpPort(Integer httpPort)` Deprecated.
    `void` | `setJettyConfig(File jettyConfig)` Deprecated.
    `void` | `setOverrideWebXml(File overrideWebXml)` Deprecated.
    `void` | `setReload(String reload)` Deprecated. Sets the reload mode, which is either `"automatic"` or `"manual"`.
    `void` | `setRequestLog(org.mortbay.jetty.RequestLog requestLog)` Deprecated.
    `void` | `setScanIntervalSeconds(int scanIntervalSeconds)` Deprecated. Sets the interval in seconds between scanning the web app for file changes.
    `void` | `setScannerListeners(List<org.mortbay.util.Scanner.Listener> listeners)` Deprecated.
    `void` | `setServer(org.gradle.api.plugins.jetty.internal.JettyPluginServer server)` Deprecated.
    `void` | `setStopKey(String stopKey)` Deprecated.
    `void` | `setStopPort(Integer stopPort)` Deprecated.
    `void` | `setUserRealms(org.mortbay.jetty.security.UserRealm[] userRealms)` Deprecated.
    `void` | `setWebAppConfig(org.gradle.api.plugins.jetty.internal.JettyPluginWebAppContext webAppConfig)` Deprecated.
    `void` | `setWebDefaultXml(File webDefaultXml)` Deprecated.
    `protected void` | `start()` Deprecated.
    `protected void` | `startConsoleScanner()` Deprecated. Run a thread that monitors the console input to detect ENTER hits.
    `void` | `startJetty()` Deprecated.
    `void` | `startJettyInternal()` Deprecated.
    `abstract void` | `validateConfiguration()` Deprecated.

    - ### Methods inherited from class org.gradle.api.internal.ConventionTask

      `conventionMapping, conventionMapping, getConventionMapping`

    - ### Methods inherited from class org.gradle.api.internal.AbstractTask

      `addValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, finalizedBy, getActionClassLoaders, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### reload

          protected String reload

      Deprecated.

    - #### scannerListeners

          protected List<org.mortbay.util.Scanner.Listener> scannerListeners

      Deprecated.
      List of Listeners for the scanner.

    - #### consoleScanner

          protected Thread consoleScanner

      Deprecated.
      A scanner to check ENTER hits on the console.

    - #### PORT_SYSPROPERTY

          public static final String PORT_SYSPROPERTY

      Deprecated.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AbstractJettyRunTask

          public AbstractJettyRunTask()

      Deprecated.

  - ### Method Detail

    - #### validateConfiguration

          public abstract void validateConfiguration()

      Deprecated.

    - #### configureScanner

          public abstract void configureScanner()

      Deprecated.

    - #### applyJettyXml

          public abstract void applyJettyXml()
                                      throws Exception

      Deprecated.
      Throws:
        `Exception`

    - #### createServer

          public abstract org.gradle.api.plugins.jetty.internal.JettyPluginServer createServer()
                                                                                        throws Exception

      Deprecated.
      create a proxy that wraps a particular jetty version Server object.
      Returns:
        The Jetty Plugin Server
      Throws:
        `Exception`

    - #### finishConfigurationBeforeStart

          public abstract void finishConfigurationBeforeStart()
                                                       throws Exception

      Deprecated.
      Throws:
        `Exception`

    - #### start

          protected void start()

      Deprecated.

    - #### getServer

          @Internal
          public org.gradle.api.plugins.jetty.internal.JettyPluginServer getServer()

      Deprecated.

    - #### setServer

          public void setServer(org.gradle.api.plugins.jetty.internal.JettyPluginServer server)

      Deprecated.

    - #### setScannerListeners

          public void setScannerListeners(List<org.mortbay.util.Scanner.Listener> listeners)

      Deprecated.

    - #### getScannerListeners

          @Internal
          public List<org.mortbay.util.Scanner.Listener> getScannerListeners()

      Deprecated.

    - #### getScanner

          @Internal
          public org.mortbay.util.Scanner getScanner()

      Deprecated.

    - #### startJetty

          public void startJetty()

      Deprecated.

    - #### startJettyInternal

          public void startJettyInternal()

      Deprecated.

    - #### restartWebApp

          public abstract void restartWebApp(boolean reconfigureScanner)
                                      throws Exception

      Deprecated.
      Throws:
        `Exception`

    - #### configureWebApplication

          public void configureWebApplication()
                                       throws Exception

      Deprecated.
      Subclasses should invoke this to setup basic info on the webapp.
      Throws:
        `Exception`

    - #### startConsoleScanner

          protected void startConsoleScanner()

      Deprecated.
      Run a thread that monitors the console input to detect ENTER hits.

    - #### findJettyWebXmlFile

          public File findJettyWebXmlFile(File webInfDir)

      Deprecated.
      Try and find a jetty-web.xml file, using some historical naming conventions if necessary.
      Returns:
        File object to the location of the jetty-web.xml

    - #### getWebDefaultXml

          @InputFile
          @Optional
          public File getWebDefaultXml()

      Deprecated.

    - #### setWebDefaultXml

          public void setWebDefaultXml(File webDefaultXml)

      Deprecated.

    - #### getOverrideWebXml

          @InputFile
          @Optional
          public File getOverrideWebXml()

      Deprecated.

    - #### setOverrideWebXml

          public void setOverrideWebXml(File overrideWebXml)

      Deprecated.

    - #### getScanIntervalSeconds

          @Internal
          public int getScanIntervalSeconds()

      Deprecated.
      Returns the interval in seconds between scanning the web app for file changes. If file changes are detected, the web app is reloaded. Only relevant if `reload` is set to `"automatic"`. Defaults to `0`, which disables automatic reloading.

    - #### setScanIntervalSeconds

          public void setScanIntervalSeconds(int scanIntervalSeconds)

      Deprecated.
      Sets the interval in seconds between scanning the web app for file changes. If file changes are detected, the web app is reloaded. Only relevant if `reload` is set to `"automatic"`. Defaults to `0`, which disables automatic reloading.

    - #### getContextPath

          @Internal
          public String getContextPath()

      Deprecated.
      Returns the context path to use to deploy the web application.

    - #### setContextPath

          public void setContextPath(String contextPath)

      Deprecated.

    - #### getWebAppConfig

          @Internal
          public org.gradle.api.plugins.jetty.internal.JettyPluginWebAppContext getWebAppConfig()

      Deprecated.

    - #### setWebAppConfig

          public void setWebAppConfig(org.gradle.api.plugins.jetty.internal.JettyPluginWebAppContext webAppConfig)

      Deprecated.

    - #### getReload

          @Internal
          public String getReload()

      Deprecated.
      Returns the reload mode, which is either `"automatic"` or `"manual"`.

      In automatic mode, the web app is scanned for file changes every n seconds, where n is determined by the `scanIntervalSeconds` property. (Note that `scanIntervalSeconds` defaults to `0`, which disables automatic reloading.) If files changes are detected, the web app is reloaded.

      In manual mode, the web app is reloaded whenever the Enter key is pressed.

    - #### setReload

          public void setReload(String reload)

      Deprecated.
      Sets the reload mode, which is either `"automatic"` or `"manual"`.

      In automatic mode, the web app is scanned for file changes every n seconds, where n is determined by the `scanIntervalSeconds` property. (Note that `scanIntervalSeconds` defaults to `0`, which disables automatic reloading.) If files changes are detected, the web app is reloaded.

      In manual mode, the web app is reloaded whenever the Enter key is pressed.

    - #### getJettyConfig

          @InputFile
          @Optional
          public File getJettyConfig()

      Deprecated.
      Returns the jetty configuration file to use. When `null`, no configuration file is used.

    - #### setJettyConfig

          public void setJettyConfig(File jettyConfig)

      Deprecated.

    - #### getStopPort

          @Internal
          public Integer getStopPort()

      Deprecated.
      Returns the TCP port for Jetty to listen on for stop requests.

    - #### setStopPort

          public void setStopPort(Integer stopPort)

      Deprecated.

    - #### getStopKey

          @Internal
          public String getStopKey()

      Deprecated.
      Returns the key to use to stop Jetty.

    - #### setStopKey

          public void setStopKey(String stopKey)

      Deprecated.

    - #### isDaemon

          @Internal
          public boolean isDaemon()

      Deprecated.
      Specifies whether the Jetty server should run in the background. When `true`, this task completes as soon as the server has started. When `false`, this task blocks until the Jetty server is stopped.

    - #### setDaemon

          public void setDaemon(boolean daemon)

      Deprecated.

    - #### getHttpPort

          @Internal
          public Integer getHttpPort()

      Deprecated.
      Returns the TCP port for Jetty to listen on for incoming HTTP requests.

    - #### setHttpPort

          public void setHttpPort(Integer httpPort)

      Deprecated.

    - #### getConnectors

          @Internal
          public org.mortbay.jetty.Connector[] getConnectors()

      Deprecated.

    - #### setConnectors

          public void setConnectors(org.mortbay.jetty.Connector[] connectors)

      Deprecated.

    - #### getUserRealms

          @Internal
          public org.mortbay.jetty.security.UserRealm[] getUserRealms()

      Deprecated.

    - #### setUserRealms

          public void setUserRealms(org.mortbay.jetty.security.UserRealm[] userRealms)

      Deprecated.

    - #### getRequestLog

          @Internal
          public org.mortbay.jetty.RequestLog getRequestLog()

      Deprecated.

    - #### setRequestLog

          public void setRequestLog(org.mortbay.jetty.RequestLog requestLog)

      Deprecated.

    - #### getAdditionalRuntimeJars

          @Classpath
          public Iterable<File> getAdditionalRuntimeJars()

      Deprecated.
      Returns the classpath to make available to the web application.

    - #### setAdditionalRuntimeJars

          public void setAdditionalRuntimeJars(Iterable<File> additionalRuntimeJars)

      Deprecated.