Base class for all tasks which deploy a web application to an embedded Tomcat web container.
Modifiers | Name | Description |
---|---|---|
static java.lang.Object |
CONFIG_FILE |
Type | Name and description |
---|---|
java.lang.String |
URIEncoding Specifies the character encoding used to decode the URI bytes by the HTTP Connector. |
java.lang.Iterable<java.io.File> |
additionalRuntimeResources Defines additional runtime JARs or directories that are not provided by the web application. |
java.lang.Integer |
ajpPort The TCP port which Tomcat should listen for AJP requests. |
java.lang.String |
ajpProtocol The AJP protocol handler class name to be used. |
java.lang.String |
clientAuth The clientAuth setting to use, values may be: "true", "false" or "want". |
java.io.File |
configFile The path to the Tomcat context XML file. |
java.lang.String |
contextPath The URL context path under which the web application will be registered. |
java.lang.Boolean |
daemon Specifies whether the Tomcat server should run in the background. |
java.lang.Boolean |
enableSSL Determines whether the HTTPS connector should be created. |
java.lang.Integer |
httpPort The TCP port which Tomcat should listen for HTTP requests. |
java.lang.String |
httpProtocol The HTTP protocol handler class name to be used. |
java.lang.Integer |
httpsPort The TCP port which Tomcat should listen for HTTPS requests. |
java.lang.String |
httpsProtocol The HTTPS protocol handler class name to be used. |
java.io.File |
keystoreFile The keystore file to use for SSL, if enabled (by default, a keystore will be generated). |
java.lang.String |
keystorePass The keystore password to use for SSL, if enabled. |
java.io.File |
outputFile The file to write Tomcat log messages to. |
java.lang.Boolean |
preserveSSLKey Doesn't override existing SSL key. |
java.lang.Object |
realm |
java.lang.Boolean |
reloadable Forces context scanning if you don't use a context file. |
java.net.URL |
resolvedConfigFile |
java.lang.Object |
server |
java.lang.String |
stopKey The key to pass to Tomcat when requesting it to stop. |
java.lang.Integer |
stopPort The TCP port which Tomcat should listen for admin requests. |
org.gradle.api.file.FileCollection |
tomcatClasspath Classpath for Tomcat libraries. |
java.io.File |
truststoreFile The truststore file to use for SSL, if enabled. |
java.lang.String |
truststorePass The truststore password to use for SSL, if enabled. |
java.util.List<TomcatUser> |
users The list of Tomcat users. |
java.io.File |
webDefaultXml The default web.xml. |
Constructor and description |
---|
AbstractTomcatRun
() |
Type Params | Return Type | Name and description |
---|---|---|
|
protected void |
addWebappResource(java.io.File resource) |
|
protected void |
configureWebApplication() Configures web application |
|
protected java.lang.String |
getFullContextPath() |
|
void |
setWebApplicationContext() |
|
protected void |
start() |
|
void |
startTomcat() |
|
void |
user(java.lang.String username, java.lang.String password, java.util.List<java.lang.String> roles) Adds a Tomcat user by providing required fields. |
|
protected void |
validateConfiguration() Validates configuration and throws an exception if |
|
void |
validateConfigurationAndStartTomcat() |
Specifies the character encoding used to decode the URI bytes by the HTTP Connector. Defaults to "UTF-8".
Defines additional runtime JARs or directories that are not provided by the web application.
The TCP port which Tomcat should listen for AJP requests. Defaults to 8009.
The AJP protocol handler class name to be used. Defaults to org.apache.coyote.ajp.AjpProtocol.
The clientAuth setting to use, values may be: "true", "false" or "want". Defaults to "false".
The path to the Tomcat context XML file.
The URL context path under which the web application will be registered. Defaults to WAR name.
Specifies whether the Tomcat 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 Tomcat server is stopped. Defaults to false.
Determines whether the HTTPS connector should be created. Defaults to false.
The TCP port which Tomcat should listen for HTTP requests. Defaults to 8080.
The HTTP protocol handler class name to be used. Defaults to org.apache.coyote.http11.Http11Protocol.
The TCP port which Tomcat should listen for HTTPS requests. Defaults to 8443.
The HTTPS protocol handler class name to be used. Defaults to org.apache.coyote.http11.Http11Protocol.
The keystore file to use for SSL, if enabled (by default, a keystore will be generated).
The keystore password to use for SSL, if enabled.
The file to write Tomcat log messages to. If the file already exists new messages will be appended.
Doesn't override existing SSL key. Defaults to false.
Forces context scanning if you don't use a context file. Defaults to true.
The key to pass to Tomcat when requesting it to stop. Defaults to "stopKey".
The TCP port which Tomcat should listen for admin requests. Defaults to 8081.
Classpath for Tomcat libraries.
The truststore file to use for SSL, if enabled.
The truststore password to use for SSL, if enabled.
The list of Tomcat users. Defaults to an empty list.
The default web.xml. If it doesn't get defined an instance of org.apache.catalina.servlets.DefaultServlet and org.apache.jasper.servlet.JspServlet will be set up.
Configures web application
Adds a Tomcat user by providing required fields. Allows for adding users in enhanced tasks without having to know the plugin's API class representing a Tomcat user.
username
- Usernamepassword
- Passwordroles
- RolesValidates configuration and throws an exception if
Groovy Documentation