org.apache.tomcat.maven.plugin.tomcat7.deploy
Class AbstractDeployWarMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.tomcat.maven.plugin.tomcat7.AbstractTomcat7Mojo
          extended by org.apache.tomcat.maven.plugin.tomcat7.AbstractCatalinaMojo
              extended by org.apache.tomcat.maven.plugin.tomcat7.AbstractWarCatalinaMojo
                  extended by org.apache.tomcat.maven.plugin.tomcat7.deploy.AbstractDeployMojo
                      extended by org.apache.tomcat.maven.plugin.tomcat7.deploy.AbstractDeployWarMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
DeployMojo, DeployOnlyMojo

public class AbstractDeployWarMojo
extends AbstractDeployMojo

Since:
1.0-alpha-2
Author:
olamy

Field Summary
 
Fields inherited from class org.apache.tomcat.maven.plugin.tomcat7.AbstractTomcat7Mojo
messagesProvider, path
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractDeployWarMojo()
           
 
Method Summary
protected  void deployWar()
          Deploys the WAR 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.apache.tomcat.maven.plugin.tomcat7.deploy.AbstractDeployMojo
deployContext, deployWarAndContext, getContextFile, getTag, invokeManager, isUpdate, validateContextFile
 
Methods inherited from class org.apache.tomcat.maven.plugin.tomcat7.AbstractWarCatalinaMojo
execute, isWar
 
Methods inherited from class org.apache.tomcat.maven.plugin.tomcat7.AbstractCatalinaMojo
getDeployedURL, getManager, getPath, getURL, log
 
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

AbstractDeployWarMojo

public AbstractDeployWarMojo()
Method Detail

getWarFile

protected File getWarFile()
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
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
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


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.