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
- All Implemented Interfaces:
- groovy.lang.GroovyObject, java.lang.Comparable<Task>, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, Task
public 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.
Methods inherited from class org.gradle.api.plugins.jetty.AbstractJettyRunTask |
findJettyWebXmlFile, getAdditionalRuntimeJars, getConnectors, getContextPath, getHttpPort, getJettyConfig, getOverrideWebXml, getReload, getRequestLog, getScanIntervalSeconds, getScanner, getScannerListeners, getServer, getStopKey, getStopPort, getTmpDirectory, getUserRealms, getWebAppConfig, getWebDefaultXml, isDaemon, setAdditionalRuntimeJars, setConnectors, setContextPath, setDaemon, setHttpPort, setJettyConfig, setOverrideWebXml, setReload, setRequestLog, setScanIntervalSeconds, setScannerListeners, setServer, setStopKey, setStopPort, setTmpDirectory, setUserRealms, setWebAppConfig, setWebDefaultXml, startConsoleScanner, startJetty, startJettyInternal |
Methods inherited from class org.gradle.api.internal.ConventionTask |
conv, conventionMapping, conventionMapping, conventionProperty, getConventionAwareHelper, getConventionMapping, setConventionAwareHelper, setConventionMapping |
Methods inherited from class org.gradle.api.DefaultTask |
configure, doFirst, doLast, leftShift, methodMissing, propertyMissing, setProperty |
Methods inherited from class org.gradle.api.internal.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, hashCode, hasProperty, isDidWork, isEnabled, isExecuted, onlyIf, onlyIf, property, setActions, setAdditionalProperties, setDependsOn, setDescription, setDidWork, setEnabled, setExecuted, setName, setProject, setSkipProperties, setStandardOutputCapture, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface groovy.lang.GroovyObject |
getMetaClass, getProperty, invokeMethod, setMetaClass |
JettyRun
public JettyRun(Project project,
java.lang.String name)
validateConfiguration
public void validateConfiguration()
- Specified by:
validateConfiguration
in class AbstractJettyRunTask
configureWebApplication
public void configureWebApplication()
throws java.lang.Exception
- Description copied from class:
AbstractJettyRunTask
- Subclasses should invoke this to setup basic info
on the webapp
- Overrides:
configureWebApplication
in class AbstractJettyRunTask
- Throws:
java.lang.Exception
configureScanner
public void configureScanner()
- Specified by:
configureScanner
in class AbstractJettyRunTask
restartWebApp
public void restartWebApp(boolean reconfigureScanner)
throws java.lang.Exception
- Specified by:
restartWebApp
in class AbstractJettyRunTask
- Throws:
java.lang.Exception
finishConfigurationBeforeStart
public void finishConfigurationBeforeStart()
throws java.lang.Exception
- Specified by:
finishConfigurationBeforeStart
in class AbstractJettyRunTask
- Throws:
java.lang.Exception
applyJettyXml
public void applyJettyXml()
throws java.lang.Exception
- Specified by:
applyJettyXml
in class AbstractJettyRunTask
- Throws:
java.lang.Exception
createServer
public JettyPluginServer createServer()
- Description copied from class:
AbstractJettyRunTask
- create a proxy that wraps a particular jetty version Server object
- Specified by:
createServer
in class AbstractJettyRunTask
- Returns:
- The Jetty Plugin Server
- See Also:
createServer()
getClassesDirectory
public java.io.File getClassesDirectory()
setClassesDirectory
public void setClassesDirectory(java.io.File classesDirectory)
getJettyEnvXml
public java.io.File getJettyEnvXml()
setJettyEnvXml
public void setJettyEnvXml(java.io.File jettyEnvXml)
getWebXml
public java.io.File getWebXml()
setWebXml
public void setWebXml(java.io.File webXml)
getWebAppSourceDirectory
public java.io.File getWebAppSourceDirectory()
setWebAppSourceDirectory
public void setWebAppSourceDirectory(java.io.File webAppSourceDirectory)
getScanTargets
public java.io.File[] getScanTargets()
setScanTargets
public void setScanTargets(java.io.File[] scanTargets)
getExtraScanTargets
public java.util.List<java.io.File> getExtraScanTargets()
setExtraScanTargets
public void setExtraScanTargets(java.util.List<java.io.File> extraScanTargets)
getJettyEnvXmlFile
public java.io.File getJettyEnvXmlFile()
setJettyEnvXmlFile
public void setJettyEnvXmlFile(java.io.File jettyEnvXmlFile)
getClassPathFiles
public java.util.List<java.io.File> getClassPathFiles()
setClassPathFiles
public void setClassPathFiles(java.util.List<java.io.File> classPathFiles)
getScanTargetPatterns
public ScanTargetPattern[] getScanTargetPatterns()
setScanTargetPatterns
public void setScanTargetPatterns(ScanTargetPattern[] scanTargetPatterns)
getConfiguredContextHandlers
public org.mortbay.jetty.handler.ContextHandler[] getConfiguredContextHandlers()
- Returns:
- Returns the contextHandlers.
setContextHandlers
public void setContextHandlers(org.mortbay.jetty.handler.ContextHandler[] contextHandlers)
getConfiguration
public FileCollection getConfiguration()
- Returns the configuration to resolve the dependencies of the web application from.
setConfiguration
public void setConfiguration(FileCollection configuration)
- Set the configuration to resolve the dependencies of the web application from.