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
Class JettyRun

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

    class JettyRun
    extends AbstractJettyRunTask

The `JettyRun` task deploys an exploded web application to an embedded Jetty web container, without first requiring 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.

author:
  janb

Field Summary

Fields inherited from class AbstractJettyRunTask
consoleScanner, reload, scannerListeners

Constructor Summary
`JettyRun(Project project, java.lang.String name)`

Method Summary
`void` | `applyJettyXml()`
`void` | `configureScanner()`
`void` | `configureWebApplication()`
`def` | `createServer()`
`void` | `finishConfigurationBeforeStart()`
`java.util.List` | `getClassPathFiles()`
`File` | `getClassesDirectory()`
`FileCollection` | `getConfiguration()` Returns the configuration to resolve the dependencies of the web application from.
`ContextHandler[]` | `getConfiguredContextHandlers()`
`java.util.List` | `getExtraScanTargets()`
`File` | `getJettyEnvXml()`
`File` | `getJettyEnvXmlFile()`
`ScanTargetPattern[]` | `getScanTargetPatterns()`
`File[]` | `getScanTargets()`
`File` | `getWebAppSourceDirectory()`
`File` | `getWebXml()`
`void` | `restartWebApp(boolean reconfigureScanner)`
`void` | `setClassPathFiles(java.util.List classPathFiles)`
`void` | `setClassesDirectory(File classesDirectory)`
`void` | `setConfiguration(FileCollection configuration)` Set the configuration to resolve the dependencies of the web application from.
`void` | `setContextHandlers(ContextHandler[] contextHandlers)`
`void` | `setExtraScanTargets(java.util.List 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()`

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

Methods inherited from class ConventionTask
conv, conventionMapping, conventionMapping, conventionProperty, getConventionAwareHelper, getConventionMapping, setConventionAwareHelper, setConventionMapping

Methods inherited from class DefaultTask
leftShift, methodMissing, propertyMissing

Methods inherited from class AbstractTask
captureStandardOutput, compareTo, defineProperty, deleteAllActions, dependsOn, dependsOnTaskDidWork, disableStandardOutputCapture, doFirst, doLast, equals, execute, getActions, getAdditionalProperties, getAnt, getConvention, getDependsOn, getDescription, getDidWork, getDynamicObjectHelper, getEnabled, getExecuted, getLogger, getName, getPath, getProject, getSkipProperties, getStandardOutputCapture, getTaskDependencies, hasProperty, hashCode, isDidWork, isEnabled, isExecuted, onlyIf, onlyIf, property, setActions, setAdditionalProperties, setDependsOn, setDescription, setDidWork, setEnabled, setExecuted, setName, setProject, setProperty, setSkipProperties, setStandardOutputCapture, toString

Methods inherited from class java.lang.Object
hashCode, getClass, equals, toString, wait, wait, wait, notify, notifyAll

Constructor Detail

### JettyRun

    public JettyRun(Project project, java.lang.String name)

Method Detail

### applyJettyXml

    public void applyJettyXml()

### configureScanner

    public void configureScanner()

### configureWebApplication

    public void configureWebApplication()

### createServer

    public def createServer()

  see:
    JettyRun#createServer()

### finishConfigurationBeforeStart

    public void finishConfigurationBeforeStart()

### getClassPathFiles

    public java.util.List getClassPathFiles()

### getClassesDirectory

    public File getClassesDirectory()

### getConfiguration

    public FileCollection getConfiguration()

  Returns the configuration to resolve the dependencies of the web application from.

### getConfiguredContextHandlers

    public ContextHandler[] getConfiguredContextHandlers()

  return:
    Returns the contextHandlers.

### getExtraScanTargets

    public java.util.List getExtraScanTargets()

### getJettyEnvXml

    public File getJettyEnvXml()

### getJettyEnvXmlFile

    public File getJettyEnvXmlFile()

### getScanTargetPatterns

    public ScanTargetPattern[] getScanTargetPatterns()

### getScanTargets

    public File[] getScanTargets()

### getWebAppSourceDirectory

    public File getWebAppSourceDirectory()

### getWebXml

    public File getWebXml()

### restartWebApp

    public void restartWebApp(boolean reconfigureScanner)

### setClassPathFiles

    public void setClassPathFiles(java.util.List classPathFiles)

### setClassesDirectory

    public void setClassesDirectory(File classesDirectory)

### setConfiguration

    public void setConfiguration(FileCollection configuration)

  Set the configuration to resolve the dependencies of the web application from.

### setContextHandlers

    public void setContextHandlers(ContextHandler[] contextHandlers)

### setExtraScanTargets

    public void setExtraScanTargets(java.util.List extraScanTargets)

### setJettyEnvXml

    public void setJettyEnvXml(File jettyEnvXml)

### setJettyEnvXmlFile

    public void setJettyEnvXmlFile(File jettyEnvXmlFile)

### setScanTargetPatterns

    public void setScanTargetPatterns(ScanTargetPattern[] scanTargetPatterns)

### setScanTargets

    public void setScanTargets(File[] scanTargets)

### setWebAppSourceDirectory

    public void setWebAppSourceDirectory(File webAppSourceDirectory)

### setWebXml

    public void setWebXml(File webXml)

### validateConfiguration

    public void validateConfiguration()

Groovy Documentation