Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.plugins.jetty
[Java] 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

    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.

Field Summary
`static java.lang.String` | `PORT_SYSPROPERTY`
`protected java.lang.Thread` | `consoleScanner` A scanner to check ENTER hits on the console.
`protected java.lang.String` | `reload` reload can be set to either 'automatic' or 'manual' if 'manual' then the context can be reloaded by a linefeed in the console if 'automatic' then traditional reloading on changed files is enabled.
`protected java.util.ArrayList` | `scannerListeners` List of Listeners for the scanner.

Fields inherited from class org.gradle.api.internal.ConventionTask
TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION

Fields inherited from class DefaultTask
TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION

Fields inherited from class org.gradle.api.internal.AbstractTask
TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION

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

Methods inherited from class org.gradle.api.internal.ConventionTask
org.gradle.api.internal.ConventionTask#conventionMapping(java.lang.String, org.gradle.api.tasks.ConventionValue), org.gradle.api.internal.ConventionTask#getConventionMapping(), org.gradle.api.internal.ConventionTask#setConventionMapping(org.gradle.api.internal.ConventionMapping), org.gradle.api.internal.ConventionTask#setProperty(java.lang.String, java.lang.Object), org.gradle.api.internal.ConventionTask#toString(), org.gradle.api.internal.ConventionTask#compareTo(org.gradle.api.Task), org.gradle.api.internal.ConventionTask#compareTo(java.lang.Object), org.gradle.api.internal.ConventionTask#getName(), org.gradle.api.internal.ConventionTask#getActions(), org.gradle.api.internal.ConventionTask#setName(java.lang.String), org.gradle.api.internal.ConventionTask#getState(), org.gradle.api.internal.ConventionTask#getPath(), org.gradle.api.internal.ConventionTask#getLogger(), org.gradle.api.internal.ConventionTask#execute(), org.gradle.api.internal.ConventionTask#configure(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#configure(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#getDescription(), org.gradle.api.internal.ConventionTask#isEnabled(), org.gradle.api.internal.ConventionTask#captureStandardOutput(org.gradle.api.logging.LogLevel), org.gradle.api.internal.ConventionTask#disableStandardOutputCapture(), org.gradle.api.internal.ConventionTask#property(java.lang.String), org.gradle.api.internal.ConventionTask#setEnabled(boolean), org.gradle.api.internal.ConventionTask#setDescription(java.lang.String), org.gradle.api.internal.ConventionTask#getProject(), org.gradle.api.internal.ConventionTask#getGroup(), org.gradle.api.internal.ConventionTask#setGroup(java.lang.String), org.gradle.api.internal.ConventionTask#dependsOn([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#getAnt(), org.gradle.api.internal.ConventionTask#getConvention(), org.gradle.api.internal.ConventionTask#hasProperty(java.lang.String), org.gradle.api.internal.ConventionTask#getLogging(), org.gradle.api.internal.ConventionTask#setActions(java.util.List), org.gradle.api.internal.ConventionTask#getTaskDependencies(), org.gradle.api.internal.ConventionTask#getTaskDependencies(), org.gradle.api.internal.ConventionTask#getDependsOn(), org.gradle.api.internal.ConventionTask#setDependsOn(java.lang.Iterable), org.gradle.api.internal.ConventionTask#onlyIf(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#onlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.ConventionTask#setOnlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.ConventionTask#setOnlyIf(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#setDidWork(boolean), org.gradle.api.internal.ConventionTask#getDidWork(), org.gradle.api.internal.ConventionTask#doFirst(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#doFirst(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#doLast(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#doLast(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#leftShift(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#deleteAllActions(), org.gradle.api.internal.ConventionTask#getEnabled(), org.gradle.api.internal.ConventionTask#dependsOnTaskDidWork(), org.gradle.api.internal.ConventionTask#getInputs(), org.gradle.api.internal.ConventionTask#getOutputs(), org.gradle.api.internal.ConventionTask#getOutputs(), org.gradle.api.internal.ConventionTask#getTemporaryDir(), org.gradle.api.internal.ConventionTask#setProject(org.gradle.api.Project), org.gradle.api.internal.ConventionTask#getStandardOutputCapture(), org.gradle.api.internal.ConventionTask#getAdditionalProperties(), org.gradle.api.internal.ConventionTask#getDynamicObjectHelper(), org.gradle.api.internal.ConventionTask#setConvention(org.gradle.api.plugins.Convention), org.gradle.api.internal.ConventionTask#getAsDynamicObject(), org.gradle.api.internal.ConventionTask#addValidator(org.gradle.api.internal.tasks.execution.TaskValidator), org.gradle.api.internal.ConventionTask#getValidators(), org.gradle.api.internal.ConventionTask#getExecuter(), org.gradle.api.internal.ConventionTask#setExecuter(org.gradle.api.internal.tasks.TaskExecuter), org.gradle.api.internal.ConventionTask#getOnlyIf(), org.gradle.api.internal.ConventionTask#injectIntoNewInstance(org.gradle.api.internal.project.ProjectInternal, java.lang.String, java.util.concurrent.Callable), org.gradle.api.internal.ConventionTask#wait(long), org.gradle.api.internal.ConventionTask#wait(long, int), org.gradle.api.internal.ConventionTask#wait(), org.gradle.api.internal.ConventionTask#equals(java.lang.Object), org.gradle.api.internal.ConventionTask#hashCode(), org.gradle.api.internal.ConventionTask#getClass(), org.gradle.api.internal.ConventionTask#notify(), org.gradle.api.internal.ConventionTask#notifyAll()

Methods inherited from class DefaultTask
setProperty, toString, compareTo, compareTo, getName, getActions, setName, getState, getPath, getLogger, execute, configure, configure, getDescription, isEnabled, captureStandardOutput, disableStandardOutputCapture, property, setEnabled, setDescription, getProject, getGroup, setGroup, dependsOn, getAnt, getConvention, hasProperty, getLogging, setActions, getTaskDependencies, getTaskDependencies, getDependsOn, setDependsOn, onlyIf, onlyIf, setOnlyIf, setOnlyIf, setDidWork, getDidWork, doFirst, doFirst, doLast, doLast, leftShift, deleteAllActions, getEnabled, dependsOnTaskDidWork, getInputs, getOutputs, getOutputs, getTemporaryDir, setProject, getStandardOutputCapture, getAdditionalProperties, getDynamicObjectHelper, setConvention, getAsDynamicObject, addValidator, getValidators, getExecuter, setExecuter, getOnlyIf, injectIntoNewInstance, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll

Methods inherited from class org.gradle.api.internal.AbstractTask
org.gradle.api.internal.AbstractTask#setProperty(java.lang.String, java.lang.Object), org.gradle.api.internal.AbstractTask#toString(), org.gradle.api.internal.AbstractTask#compareTo(org.gradle.api.Task), org.gradle.api.internal.AbstractTask#compareTo(java.lang.Object), org.gradle.api.internal.AbstractTask#getName(), org.gradle.api.internal.AbstractTask#getActions(), org.gradle.api.internal.AbstractTask#setName(java.lang.String), org.gradle.api.internal.AbstractTask#getState(), org.gradle.api.internal.AbstractTask#getPath(), org.gradle.api.internal.AbstractTask#getLogger(), org.gradle.api.internal.AbstractTask#execute(), org.gradle.api.internal.AbstractTask#configure(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#configure(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#getDescription(), org.gradle.api.internal.AbstractTask#isEnabled(), org.gradle.api.internal.AbstractTask#captureStandardOutput(org.gradle.api.logging.LogLevel), org.gradle.api.internal.AbstractTask#disableStandardOutputCapture(), org.gradle.api.internal.AbstractTask#property(java.lang.String), org.gradle.api.internal.AbstractTask#setEnabled(boolean), org.gradle.api.internal.AbstractTask#setDescription(java.lang.String), org.gradle.api.internal.AbstractTask#getProject(), org.gradle.api.internal.AbstractTask#getGroup(), org.gradle.api.internal.AbstractTask#setGroup(java.lang.String), org.gradle.api.internal.AbstractTask#dependsOn([Ljava.lang.Object;), org.gradle.api.internal.AbstractTask#getAnt(), org.gradle.api.internal.AbstractTask#getConvention(), org.gradle.api.internal.AbstractTask#hasProperty(java.lang.String), org.gradle.api.internal.AbstractTask#getLogging(), org.gradle.api.internal.AbstractTask#setActions(java.util.List), org.gradle.api.internal.AbstractTask#getTaskDependencies(), org.gradle.api.internal.AbstractTask#getTaskDependencies(), org.gradle.api.internal.AbstractTask#getDependsOn(), org.gradle.api.internal.AbstractTask#setDependsOn(java.lang.Iterable), org.gradle.api.internal.AbstractTask#onlyIf(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#onlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.AbstractTask#setOnlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.AbstractTask#setOnlyIf(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#setDidWork(boolean), org.gradle.api.internal.AbstractTask#getDidWork(), org.gradle.api.internal.AbstractTask#doFirst(org.gradle.api.Action), org.gradle.api.internal.AbstractTask#doFirst(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#doLast(org.gradle.api.Action), org.gradle.api.internal.AbstractTask#doLast(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#leftShift(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#deleteAllActions(), org.gradle.api.internal.AbstractTask#getEnabled(), org.gradle.api.internal.AbstractTask#dependsOnTaskDidWork(), org.gradle.api.internal.AbstractTask#getInputs(), org.gradle.api.internal.AbstractTask#getOutputs(), org.gradle.api.internal.AbstractTask#getOutputs(), org.gradle.api.internal.AbstractTask#getTemporaryDir(), org.gradle.api.internal.AbstractTask#setProject(org.gradle.api.Project), org.gradle.api.internal.AbstractTask#getStandardOutputCapture(), org.gradle.api.internal.AbstractTask#getAdditionalProperties(), org.gradle.api.internal.AbstractTask#getDynamicObjectHelper(), org.gradle.api.internal.AbstractTask#setConvention(org.gradle.api.plugins.Convention), org.gradle.api.internal.AbstractTask#getAsDynamicObject(), org.gradle.api.internal.AbstractTask#addValidator(org.gradle.api.internal.tasks.execution.TaskValidator), org.gradle.api.internal.AbstractTask#getValidators(), org.gradle.api.internal.AbstractTask#getExecuter(), org.gradle.api.internal.AbstractTask#setExecuter(org.gradle.api.internal.tasks.TaskExecuter), org.gradle.api.internal.AbstractTask#getOnlyIf(), org.gradle.api.internal.AbstractTask#injectIntoNewInstance(org.gradle.api.internal.project.ProjectInternal, java.lang.String, java.util.concurrent.Callable), org.gradle.api.internal.AbstractTask#wait(long), org.gradle.api.internal.AbstractTask#wait(long, int), org.gradle.api.internal.AbstractTask#wait(), org.gradle.api.internal.AbstractTask#equals(java.lang.Object), org.gradle.api.internal.AbstractTask#hashCode(), org.gradle.api.internal.AbstractTask#getClass(), org.gradle.api.internal.AbstractTask#notify(), org.gradle.api.internal.AbstractTask#notifyAll()

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Field Detail

### PORT_SYSPROPERTY

    public static final java.lang.String PORT_SYSPROPERTY

### consoleScanner

    protected java.lang.Thread consoleScanner

  A scanner to check ENTER hits on the console.

### reload

    protected java.lang.String reload

  reload can be set to either 'automatic' or 'manual'

  if 'manual' then the context can be reloaded by a linefeed in the console if 'automatic' then traditional reloading on changed files is enabled.

### scannerListeners

    protected java.util.ArrayList scannerListeners

  List of Listeners for the scanner.

Method Detail

### applyJettyXml

    public void applyJettyXml()

### configureScanner

    public void configureScanner()

### configureWebApplication

    public void configureWebApplication()

  Subclasses should invoke this to setup basic info on the webapp.

### createServer

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

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

### findJettyWebXmlFile

    public java.io.File findJettyWebXmlFile(java.io.File webInfDir)

  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

### finishConfigurationBeforeStart

    public void finishConfigurationBeforeStart()

### getAdditionalRuntimeJars

    @InputFiles
    public java.lang.Iterable getAdditionalRuntimeJars()

  Returns the classpath to make available to the web application.

### getConnectors

    public Connector[] getConnectors()

### getContextPath

    public java.lang.String getContextPath()

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

### getHttpPort

    public java.lang.Integer getHttpPort()

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

### getJettyConfig

    @InputFile
    @Optional
    public java.io.File getJettyConfig()

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

### getOverrideWebXml

    @InputFile
    @Optional
    public java.io.File getOverrideWebXml()

### getReload

    public java.lang.String getReload()

### getRequestLog

    public org.mortbay.jetty.RequestLog getRequestLog()

### getScanIntervalSeconds

    public int getScanIntervalSeconds()

### getScanner

    public org.mortbay.util.Scanner getScanner()

### getScannerListeners

    public java.util.ArrayList getScannerListeners()

### getServer

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

### getStopKey

    public java.lang.String getStopKey()

  Returns the key to use to stop Jetty.

### getStopPort

    public java.lang.Integer getStopPort()

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

### getUserRealms

    public UserRealm[] getUserRealms()

### getWebAppConfig

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

### getWebDefaultXml

    @InputFile
    @Optional
    public java.io.File getWebDefaultXml()

### isDaemon

    public boolean isDaemon()

  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.

### restartWebApp

    public void restartWebApp(boolean reconfigureScanner)

### setAdditionalRuntimeJars

    public void setAdditionalRuntimeJars(java.lang.Iterable additionalRuntimeJars)

### setConnectors

    public void setConnectors(Connector[] connectors)

### setContextPath

    public void setContextPath(java.lang.String contextPath)

### setDaemon

    public void setDaemon(boolean daemon)

### setHttpPort

    public void setHttpPort(java.lang.Integer httpPort)

### setJettyConfig

    public void setJettyConfig(java.io.File jettyConfig)

### setOverrideWebXml

    public void setOverrideWebXml(java.io.File overrideWebXml)

### setReload

    public void setReload(java.lang.String reload)

### setRequestLog

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

### setScanIntervalSeconds

    public void setScanIntervalSeconds(int scanIntervalSeconds)

### setScannerListeners

    public void setScannerListeners(java.util.ArrayList listeners)

### setServer

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

### setStopKey

    public void setStopKey(java.lang.String stopKey)

### setStopPort

    public void setStopPort(java.lang.Integer stopPort)

### setUserRealms

    public void setUserRealms(UserRealm[] userRealms)

### setWebAppConfig

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

### setWebDefaultXml

    public void setWebDefaultXml(java.io.File webDefaultXml)

### start

    @TaskAction
    protected void start()

### startConsoleScanner

    protected void startConsoleScanner()

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

### startJetty

    public void startJetty()

### startJettyInternal

    public void startJettyInternal()

### validateConfiguration

    public void validateConfiguration()

Groovy Documentation