Groovy Documentation

org.gradle.api.plugins.jetty
Class JettyRun

java.lang.Object
  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()

 
Method Summary
void applyJettyXml()

void configureScanner()

void configureWebApplication()

def createServer()

void finishConfigurationBeforeStart()

java.util.List getClassPathFiles()

FileCollection getClasspath()

Returns the classpath for the web application.

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 setClasspath(FileCollection classpath)

Set the classpath for the web application

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, start, startConsoleScanner, startJetty, startJettyInternal, validateConfiguration
 

Constructor Detail

JettyRun

JettyRun()


 
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()


getClasspath

@InputFiles
public FileCollection getClasspath()
Returns the classpath for the web application.


getConfiguredContextHandlers

public ContextHandler[] getConfiguredContextHandlers()
return:
Returns the contextHandlers.


getExtraScanTargets

public java.util.List getExtraScanTargets()


getJettyEnvXml

@InputFile
@Optional
public File getJettyEnvXml()


getJettyEnvXmlFile

@InputFile
@Optional
public File getJettyEnvXmlFile()


getScanTargetPatterns

public ScanTargetPattern[] getScanTargetPatterns()


getScanTargets

public File[] getScanTargets()


getWebAppSourceDirectory

@InputDirectory
public File getWebAppSourceDirectory()


getWebXml

public File getWebXml()


restartWebApp

public void restartWebApp(boolean reconfigureScanner)


setClassPathFiles

public void setClassPathFiles(java.util.List classPathFiles)


setClasspath

public void setClasspath(FileCollection classpath)
Set the classpath for the web application


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