Package org.apache.catalina.ant
Class DeployTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- org.apache.catalina.ant.BaseRedirectorHelperTask
-
- org.apache.catalina.ant.AbstractCatalinaTask
-
- org.apache.catalina.ant.AbstractCatalinaCommandTask
-
- org.apache.catalina.ant.DeployTask
-
- All Implemented Interfaces:
java.lang.Cloneable
public class DeployTask extends AbstractCatalinaCommandTask
Ant task that implements the/deploycommand, supported by the Tomcat manager application.- Since:
- 4.1
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringconfigURL of the context configuration file for this application, if any.protected java.lang.StringlocalWarURL of the server local web application archive (WAR) file to be deployed.protected java.lang.StringtagTag to associate with this to be deployed webapp.protected booleanupdateUpdate existing webapps.protected java.lang.StringwarURL of the web application archive (WAR) file to be deployed.-
Fields inherited from class org.apache.catalina.ant.AbstractCatalinaCommandTask
path, version
-
Fields inherited from class org.apache.catalina.ant.AbstractCatalinaTask
charset, ignoreResponseConstraint, password, url, username
-
Fields inherited from class org.apache.catalina.ant.BaseRedirectorHelperTask
alwaysLog, failOnError, redirectErrStream, redirector, redirectorConfigured, redirectorElement, redirectOutput, redirectOutStream
-
-
Constructor Summary
Constructors Constructor Description DeployTask()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Execute the requested operation.java.lang.StringgetConfig()Get the context configuration file URL.java.lang.StringgetLocalWar()Get the local WAR file path.java.lang.StringgetTag()Get the deployment tag.booleangetUpdate()Check if existing webapps should be updated.java.lang.StringgetWar()Get the WAR file URL.voidsetConfig(java.lang.String config)Set the context configuration file URL.voidsetLocalWar(java.lang.String localWar)Set the local WAR file path.voidsetTag(java.lang.String tag)Set the deployment tag.voidsetUpdate(boolean update)Set whether to update existing webapps.voidsetWar(java.lang.String war)Set the WAR file URL.-
Methods inherited from class org.apache.catalina.ant.AbstractCatalinaCommandTask
createQueryString, getPath, getVersion, setPath, setVersion
-
Methods inherited from class org.apache.catalina.ant.AbstractCatalinaTask
execute, execute, getCharset, getPassword, getUrl, getUsername, isIgnoreResponseConstraint, setCharset, setIgnoreResponseConstraint, setPassword, setUrl, setUsername
-
Methods inherited from class org.apache.catalina.ant.BaseRedirectorHelperTask
addConfiguredRedirector, closeRedirector, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, handleOutput, isFailOnError, openRedirector, setAlwaysLog, setAppend, setCreateEmptyFiles, setError, setErrorProperty, setFailonerror, setLogError, setOutput, setOutputproperty
-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleInput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
-
-
-
Field Detail
-
config
protected java.lang.String config
URL of the context configuration file for this application, if any.
-
localWar
protected java.lang.String localWar
URL of the server local web application archive (WAR) file to be deployed.
-
tag
protected java.lang.String tag
Tag to associate with this to be deployed webapp.
-
update
protected boolean update
Update existing webapps.
-
war
protected java.lang.String war
URL of the web application archive (WAR) file to be deployed.
-
-
Method Detail
-
getConfig
public java.lang.String getConfig()
Get the context configuration file URL.- Returns:
- Context configuration file URL
-
setConfig
public void setConfig(java.lang.String config)
Set the context configuration file URL.- Parameters:
config- Context configuration file URL
-
getLocalWar
public java.lang.String getLocalWar()
Get the local WAR file path.- Returns:
- Local WAR file path
-
setLocalWar
public void setLocalWar(java.lang.String localWar)
Set the local WAR file path.- Parameters:
localWar- Local WAR file path
-
getTag
public java.lang.String getTag()
Get the deployment tag.- Returns:
- Deployment tag
-
setTag
public void setTag(java.lang.String tag)
Set the deployment tag.- Parameters:
tag- Deployment tag
-
getUpdate
public boolean getUpdate()
Check if existing webapps should be updated.- Returns:
trueif existing webapps should be updated
-
setUpdate
public void setUpdate(boolean update)
Set whether to update existing webapps.- Parameters:
update-trueto update existing webapps
-
getWar
public java.lang.String getWar()
Get the WAR file URL.- Returns:
- WAR file URL
-
setWar
public void setWar(java.lang.String war)
Set the WAR file URL.- Parameters:
war- WAR file URL
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionExecute the requested operation.- Overrides:
executein classAbstractCatalinaTask- Throws:
org.apache.tools.ant.BuildException- if an error occurs
-
-