org.codehaus.cargo.maven2
Class ContainerStartMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.cargo.maven2.AbstractCommonMojo
          extended by org.codehaus.cargo.maven2.AbstractCargoMojo
              extended by org.codehaus.cargo.maven2.ContainerStartMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class ContainerStartMojo
extends AbstractCargoMojo

Start a container using Cargo.

Version:
$Id: ContainerStartMojo.java 1238 2006-11-26 14:53:52Z vmassol $

Field Summary
 
Fields inherited from class org.codehaus.cargo.maven2.AbstractCargoMojo
CONTEXT_KEY_CONTAINER
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ContainerStartMojo()
           
 
Method Summary
protected  void addAutoDeployDeployable(org.codehaus.cargo.container.LocalContainer container)
          If the project's packaging is war, ear or ejb and there is no deployer specified and the user has not defined the auto-deployable inside the <deployables> element, then add the generated artifact to the list of deployables to deploy statically.
 void doExecute()
          Executes the plugin.
 
Methods inherited from class org.codehaus.cargo.maven2.AbstractCargoMojo
containsAutoDeployable, createAutoDeployDeployable, createConfiguration, createContainer, createLogger, createNewContainer, execute, getCargoProject, getConfigurationElement, getContainerElement, getDeployerElement, getFileHandler, loadEmbeddedContainerDependencies, setCargoProject, setConfigurationElement, setContainerElement, setDeployerElement, setFileHandler
 
Methods inherited from class org.codehaus.cargo.maven2.AbstractCommonMojo
getProject
 
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

ContainerStartMojo

public ContainerStartMojo()
Method Detail

doExecute

public void doExecute()
               throws org.apache.maven.plugin.MojoExecutionException
Executes the plugin.

This method must be implemented by all Mojos extending this class. The reason for this pattern is because we want the AbstractCargoMojo.execute() method to always be called so that necessary plugin initialization can be performed. Without this pattern Mojos extending this class could "forget" to call super.execute() thus leading to unpredictible results.

Specified by:
doExecute in class AbstractCargoMojo
Throws:
org.apache.maven.plugin.MojoExecutionException - in case of error
See Also:
AbstractCargoMojo.doExecute()

addAutoDeployDeployable

protected void addAutoDeployDeployable(org.codehaus.cargo.container.LocalContainer container)
                                throws org.apache.maven.plugin.MojoExecutionException
If the project's packaging is war, ear or ejb and there is no deployer specified and the user has not defined the auto-deployable inside the <deployables> element, then add the generated artifact to the list of deployables to deploy statically. Note that the reason we check that a deployer element has not been specified is because if it has then the auto deployable will be deployed by the specified deployer.

Parameters:
container - the local container to which to add the project's artifact
Throws:
org.apache.maven.plugin.MojoExecutionException - if an error occurs


Copyright © 2004-2009 Codehaus. All Rights Reserved.