Package org.codehaus.cargo.maven3
Class ContainerStartMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.cargo.maven3.AbstractCommonMojo
-
- org.codehaus.cargo.maven3.AbstractCargoMojo
-
- org.codehaus.cargo.maven3.ContainerStartMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
ContainerRestartMojo
,ContainerRunMojo
@Mojo(name="start", requiresDependencyResolution=TEST, threadSafe=true) public class ContainerStartMojo extends AbstractCargoMojo
Start a container using Cargo.
-
-
Field Summary
Fields Modifier and Type Field Description protected LocalContainer
localContainer
Local container.-
Fields inherited from class org.codehaus.cargo.maven3.AbstractCargoMojo
CONTEXT_KEY_CLASSLOADER, CONTEXT_KEY_CONTAINER
-
-
Constructor Summary
Constructors Constructor Description ContainerStartMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAutoDeployDeployable(LocalContainer container)
If the project's packaging is war, ear or ejb and there is no deployer specified using 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.void
doExecute()
Executes the plugin.protected void
executeLocalContainerAction()
Executes the local container action.-
Methods inherited from class org.codehaus.cargo.maven3.AbstractCargoMojo
calculateArtifact, calculateContainerArtifactId, createAutoDeployDeployable, createConfiguration, createContainer, createDefaultContainerElementIfNecessary, createDefaultInstallerElementIfNecessary, createLogger, createNewContainer, execute, getCargoProject, getConfigurationElement, getContainerElement, getDaemon, getDeployablesElement, getDeployerElement, isIgnoreFailures, setCargoProject, setConfigurationElement, setContainerElement, setDeployablesElement, setDeployerElement, setIgnoreFailures, waitDeployableMonitor
-
Methods inherited from class org.codehaus.cargo.maven3.AbstractCommonMojo
getProject
-
-
-
-
Field Detail
-
localContainer
protected LocalContainer localContainer
Local container.
-
-
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 callsuper.execute()
thus leading to unpredictible results.- Specified by:
doExecute
in classAbstractCargoMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
- in case of error
-
executeLocalContainerAction
protected void executeLocalContainerAction()
Executes the local container action.
-
addAutoDeployDeployable
protected void addAutoDeployDeployable(LocalContainer container) throws org.apache.maven.plugin.MojoExecutionException
If the project's packaging is war, ear or ejb and there is no deployer specified using 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
-
-