org.codehaus.mojo.tomcat
Class AbstractCatalinaMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.tomcat.AbstractI18NMojo
          extended by org.codehaus.mojo.tomcat.AbstractCatalinaMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractWarCatalinaMojo, ListMojo, ResourcesMojo, RolesMojo, ServerInfoMojo

public abstract class AbstractCatalinaMojo
extends AbstractI18NMojo

Abstract goal that provides common configuration for Catalina-based goals.

Version:
$Id: AbstractCatalinaMojo.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
AbstractCatalinaMojo()
           
 
Method Summary
 void execute()
           
protected  java.net.URL getDeployedURL()
          Gets the URL of the deployed webapp.
protected  TomcatManager getManager()
          Gets the Tomcat manager wrapper object configured for this goal.
protected  java.lang.String getPath()
          Gets the webapp context path to use when communicating with Tomcat manager.
protected  java.net.URL getURL()
          Gets the full URL of the Tomcat manager instance.
protected abstract  void invokeManager()
          Invokes Tomcat manager when this Mojo is executed.
protected  void log(java.lang.String string)
          Splits the given string into lines and writes each one separately to the log at info level.
 
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

AbstractCatalinaMojo

public AbstractCatalinaMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

invokeManager

protected abstract void invokeManager()
                               throws org.apache.maven.plugin.MojoExecutionException,
                                      TomcatManagerException,
                                      java.io.IOException
Invokes Tomcat manager when this Mojo is executed.

Throws:
org.apache.maven.plugin.MojoExecutionException - if there was a problem executing this goal
TomcatManagerException - if the Tomcat manager request fails
java.io.IOException - if an i/o error occurs

getManager

protected TomcatManager getManager()
                            throws org.apache.maven.plugin.MojoExecutionException
Gets the Tomcat manager wrapper object configured for this goal.

Returns:
the Tomcat manager wrapper object
Throws:
org.apache.maven.plugin.MojoExecutionException - if there was a problem obtaining the authentication details

getURL

protected java.net.URL getURL()
Gets the full URL of the Tomcat manager instance.

Returns:
the full URL of the Tomcat manager instance to use

getPath

protected java.lang.String getPath()
Gets the webapp context path to use when communicating with Tomcat manager.

Returns:
the webapp context path to use

getDeployedURL

protected java.net.URL getDeployedURL()
                               throws java.net.MalformedURLException
Gets the URL of the deployed webapp.

Returns:
the URL of the deployed webapp
Throws:
java.net.MalformedURLException - if the deployed webapp URL is invalid

log

protected void log(java.lang.String string)
Splits the given string into lines and writes each one separately to the log at info level.

Parameters:
string - the string to write


Copyright © 2005-2009. All Rights Reserved.