org.codehaus.mojo.tomcat
Class DeployMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.tomcat.AbstractI18NMojo
          extended by org.codehaus.mojo.tomcat.AbstractCatalinaMojo
              extended by org.codehaus.mojo.tomcat.AbstractWarCatalinaMojo
                  extended by org.codehaus.mojo.tomcat.AbstractDeployMojo
                      extended by org.codehaus.mojo.tomcat.DeployMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class DeployMojo
extends AbstractDeployMojo

Deploy a WAR to Tomcat.

Version:
$Id: DeployMojo.java 6588 2008-03-28 12:22:57Z bentmann $
Author:
Mark Hobson

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
DeployMojo()
           
 
Method Summary
protected  void deployWar()
          Deploys the WAR to Tomcat.
protected  void deployWarAndContext()
          Deploys the WAR and context XML file to Tomcat.
protected  File getWarFile()
          Gets the Tomcat WAR file.
protected  void validateWarFile()
          Ensures that the Tomcat WAR file exists and is the correct type for the deployment mode.
 
Methods inherited from class org.codehaus.mojo.tomcat.AbstractDeployMojo
deployContext, getContextFile, getTag, invokeManager, isUpdate, validateContextFile
 
Methods inherited from class org.codehaus.mojo.tomcat.AbstractWarCatalinaMojo
execute, isWar
 
Methods inherited from class org.codehaus.mojo.tomcat.AbstractCatalinaMojo
getDeployedURL, getManager, getPath, getURL, log
 
Methods inherited from class org.codehaus.mojo.tomcat.AbstractI18NMojo
getMessage, getMessage, getMessage, getMessage
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeployMojo

public DeployMojo()
Method Detail

getWarFile

protected File getWarFile()
Description copied from class: AbstractDeployMojo
Gets the Tomcat WAR file. This may be a file or a directory depending on the deployment mode.

Specified by:
getWarFile in class AbstractDeployMojo
Returns:
the Tomcat WAR file.

validateWarFile

protected void validateWarFile()
                        throws org.apache.maven.plugin.MojoExecutionException
Description copied from class: AbstractDeployMojo
Ensures that the Tomcat WAR file exists and is the correct type for the deployment mode.

Specified by:
validateWarFile in class AbstractDeployMojo
Throws:
org.apache.maven.plugin.MojoExecutionException - if the WAR file does not exist or is not the correct type for the deployment mode

deployWar

protected void deployWar()
                  throws org.apache.maven.plugin.MojoExecutionException,
                         TomcatManagerException,
                         IOException
Description copied from class: AbstractDeployMojo
Deploys the WAR to Tomcat.

Overrides:
deployWar in class AbstractDeployMojo
Throws:
org.apache.maven.plugin.MojoExecutionException - if there was a problem locating the WAR
TomcatManagerException - if the Tomcat manager request fails
IOException - if an i/o error occurs

deployWarAndContext

protected void deployWarAndContext()
                            throws org.apache.maven.plugin.MojoExecutionException,
                                   TomcatManagerException,
                                   IOException
Description copied from class: AbstractDeployMojo
Deploys the WAR and context XML file to Tomcat.

Overrides:
deployWarAndContext in class AbstractDeployMojo
Throws:
org.apache.maven.plugin.MojoExecutionException - if there was a problem locating either the WAR or the context XML file
TomcatManagerException - if the Tomcat manager request fails
IOException - if an i/o error occurs


Copyright © 2005-2011 Codehaus. All Rights Reserved.