Package org.codehaus.cargo.maven3
Class AbstractDaemonMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.cargo.maven3.AbstractCommonMojo
-
- org.codehaus.cargo.maven3.AbstractCargoMojo
-
- org.codehaus.cargo.maven3.AbstractDaemonMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
DaemonStartMojo
,DaemonStopMojo
public abstract class AbstractDaemonMojo extends AbstractCargoMojo
Common mojo for all daemon actions (start deployable, stop deployable).
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
daemonAutostartContainer
Tells if the container should autostart.protected List<String>
daemonClasspaths
The additional classpath entries the daemon should use.protected DaemonClient
daemonClient
The daemon client instance.protected InstalledLocalContainer
daemonContainer
The container that should be started by the daemon.protected List<Deployable>
daemonDeployables
The deployables to deploy.protected String
daemonHandleId
The daemon handle identifier to use.-
Fields inherited from class org.codehaus.cargo.maven3.AbstractCargoMojo
CONTEXT_KEY_CLASSLOADER, CONTEXT_KEY_CONTAINER
-
-
Constructor Summary
Constructors Constructor Description AbstractDaemonMojo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
doExecute()
Executes the plugin.protected abstract void
performAction()
Performs the actual 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
-
daemonClient
protected DaemonClient daemonClient
The daemon client instance.
-
daemonHandleId
protected String daemonHandleId
The daemon handle identifier to use.
-
daemonAutostartContainer
protected boolean daemonAutostartContainer
Tells if the container should autostart.
-
daemonClasspaths
protected List<String> daemonClasspaths
The additional classpath entries the daemon should use.
-
daemonDeployables
protected final List<Deployable> daemonDeployables
The deployables to deploy.
-
daemonContainer
protected InstalledLocalContainer daemonContainer
The container that should be started by the daemon.
-
-
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
-
performAction
protected abstract void performAction() throws org.apache.maven.plugin.MojoExecutionException
Performs the actual action.- Throws:
org.apache.maven.plugin.MojoExecutionException
- If an error happens
-
-