Package org.codehaus.cargo.maven3
Class ContainerRunMojo
- java.lang.Object
- 
- org.apache.maven.plugin.AbstractMojo
- 
- org.codehaus.cargo.maven3.AbstractCommonMojo
- 
- org.codehaus.cargo.maven3.AbstractCargoMojo
- 
- org.codehaus.cargo.maven3.ContainerStartMojo
- 
- org.codehaus.cargo.maven3.ContainerRunMojo
 
 
 
 
 
- 
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled,- org.apache.maven.plugin.Mojo
 
 @Mojo(name="run", requiresDependencyResolution=TEST, threadSafe=false) public class ContainerRunMojo extends ContainerStartMojoStart a container using Cargo and wait until user pressed CTRL + C to stop.
- 
- 
Field Summary- 
Fields inherited from class org.codehaus.cargo.maven3.ContainerStartMojolocalContainer
 - 
Fields inherited from class org.codehaus.cargo.maven3.AbstractCargoMojoCONTEXT_KEY_CLASSLOADER, CONTEXT_KEY_CONTAINER
 
- 
 - 
Constructor SummaryConstructors Constructor Description ContainerRunMojo()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ContainercreateNewContainer()Creates a brand newContainerinstance.voiddoExecute()Executes the plugin.- 
Methods inherited from class org.codehaus.cargo.maven3.ContainerStartMojoaddAutoDeployDeployable, executeLocalContainerAction
 - 
Methods inherited from class org.codehaus.cargo.maven3.AbstractCargoMojocalculateArtifact, calculateContainerArtifactId, createAutoDeployDeployable, createConfiguration, createContainer, createDefaultContainerElementIfNecessary, createDefaultInstallerElementIfNecessary, createLogger, execute, getCargoProject, getConfigurationElement, getContainerElement, getDaemon, getDeployablesElement, getDeployerElement, isIgnoreFailures, setCargoProject, setConfigurationElement, setContainerElement, setDeployablesElement, setDeployerElement, setIgnoreFailures, waitDeployableMonitor
 - 
Methods inherited from class org.codehaus.cargo.maven3.AbstractCommonMojogetProject
 
- 
 
- 
- 
- 
Method Detail- 
doExecutepublic void doExecute() throws org.apache.maven.plugin.MojoExecutionExceptionExecutes 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.- Overrides:
- doExecutein class- ContainerStartMojo
- Throws:
- org.apache.maven.plugin.MojoExecutionException- in case of error
 
 - 
createNewContainerprotected Container createNewContainer() throws org.apache.maven.plugin.MojoExecutionException Creates a brand newContainerinstance. If the user has not specified a container element in the POM file or if the user has not specified the container id then automatically create a default container (as defined inAbstractCargoMojo.createDefaultContainerElementIfNecessary()) if the project calling this plugin has a WAR packaging. If the packaging is different then an exception is raised.- Overrides:
- createNewContainerin class- AbstractCargoMojo
- Returns:
- a valid Containerinstance
- Throws:
- org.apache.maven.plugin.MojoExecutionException- in case of error or if a default container could not be created
 
 
- 
 
-