Class TomcatCopyingInstalledLocalDeployer
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.spi.deployer.AbstractDeployer
-
- org.codehaus.cargo.container.spi.deployer.AbstractLocalDeployer
-
- org.codehaus.cargo.container.spi.deployer.AbstractInstalledLocalDeployer
-
- org.codehaus.cargo.container.spi.deployer.AbstractCopyingInstalledLocalDeployer
-
- org.codehaus.cargo.container.tomcat.TomcatCopyingInstalledLocalDeployer
-
- Direct Known Subclasses:
TomeeCopyingInstalledLocalDeployer
public class TomcatCopyingInstalledLocalDeployer extends AbstractCopyingInstalledLocalDeployer
Static deployer that deploys WARs to the Tomcatwebapps
directory.
-
-
Constructor Summary
Constructors Constructor Description TomcatCopyingInstalledLocalDeployer(LocalContainer container)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doDeploy(String deployableDir, Deployable deployable)
Do the actual deployment.String
getDeployableDir(Deployable deployable)
Specifies the directoryDeployable
s should be copied to.protected String
getDeployableName(Deployable deployable)
Replace the slashes with#
in the deployable name (see: CARGO-1041).void
setShouldCopyWars(boolean shouldCopyWars)
Whether the local deployer should copy the wars to the Tomcat webapps directory.void
undeploy(Deployable deployable)
Undeploy WAR deployables by deleting the local file from the Tomcat webapps directory.-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractCopyingInstalledLocalDeployer
canBeDeployed, deploy, setShouldDeployExpanded, shouldDeployExpanded
-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractInstalledLocalDeployer
getType
-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractLocalDeployer
getContainer, getFileHandler
-
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractDeployer
deploy, deploy, redeploy, redeploy, redeploy, start, start, stop, stop, undeploy
-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger, setLogger
-
-
-
-
Constructor Detail
-
TomcatCopyingInstalledLocalDeployer
public TomcatCopyingInstalledLocalDeployer(LocalContainer container)
-
-
Method Detail
-
getDeployableDir
public String getDeployableDir(Deployable deployable)
Specifies the directoryDeployable
s should be copied to.. For Tomcat this is thewebapps
directory.- Specified by:
getDeployableDir
in classAbstractCopyingInstalledLocalDeployer
- Parameters:
deployable
- Deployable to deploy.- Returns:
- Deployable directory
-
setShouldCopyWars
public void setShouldCopyWars(boolean shouldCopyWars)
Whether the local deployer should copy the wars to the Tomcat webapps directory. This is because Tomcat standalone configuration may not want to copy wars and instead configure server.xml to point to where the wars are located instead of copying them.- Parameters:
shouldCopyWars
- true if the wars should be copied
-
doDeploy
protected void doDeploy(String deployableDir, Deployable deployable)
Do the actual deployment. This can be overriden.. We override the base implementation in order to handle the special Tomcat scenarios: if the deployable is aTomcatWAR
instance and it contains acontext.xml
file that we need to manually copy.- Overrides:
doDeploy
in classAbstractCopyingInstalledLocalDeployer
- Parameters:
deployableDir
- Directory in which to deploy.deployable
- Deployable to deploy.
-
undeploy
public void undeploy(Deployable deployable)
Undeploy WAR deployables by deleting the local file from the Tomcat webapps directory. Undeploy aDeployable
from the running container. The service becomes unavailable for requests.- Specified by:
undeploy
in interfaceDeployer
- Overrides:
undeploy
in classAbstractDeployer
- Parameters:
deployable
- theDeployable
to undeploy
-
getDeployableName
protected String getDeployableName(Deployable deployable)
Replace the slashes with#
in the deployable name (see: CARGO-1041). Gets the deployable name for the givendeployable
.- Overrides:
getDeployableName
in classAbstractCopyingInstalledLocalDeployer
- Parameters:
deployable
- Deployable to get the name for.- Returns:
- Deployable name.
-
-