org.apache.geronimo.mavenplugins.geronimo.module
Class ModuleMojoSupport
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.pluginsupport.MojoSupport
org.codehaus.mojo.pluginsupport.ant.AntMojoSupport
org.apache.geronimo.mavenplugins.geronimo.GeronimoMojoSupport
org.apache.geronimo.mavenplugins.geronimo.reporting.ReportingMojoSupport
org.apache.geronimo.mavenplugins.geronimo.module.ModuleMojoSupport
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
- Direct Known Subclasses:
- DeployModuleMojo, ListModulesMojo, StartStopUndeployMojoSupport
public abstract class ModuleMojoSupport
- extends ReportingMojoSupport
Support for mojos that operate on modules.
Field Summary |
protected ModuleConfig[] |
modules
List of module artifact configurations. |
protected boolean |
stopOnFailure
Whether to stop or proceed when errors and failures are encountered |
Fields inherited from class org.codehaus.mojo.pluginsupport.ant.AntMojoSupport |
ant |
Fields inherited from class org.codehaus.mojo.pluginsupport.MojoSupport |
container, log |
Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
Methods inherited from class org.codehaus.mojo.pluginsupport.ant.AntMojoSupport |
createFileSet, createTask, inheritProperties, init, initAntLogger, mkdir, setProperty, setSystemProperty, setSystemProperty |
Methods inherited from class org.codehaus.mojo.pluginsupport.MojoSupport |
contextualize, createArtifact, doExecute, getArtifact, getArtifactFactory, getArtifactResolver, getProjectArtifacts, getProjectArtifacts, getProjectArtifacts, resolveArtifact, resolveArtifact |
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 |
modules
protected ModuleConfig[] modules
- List of module artifact configurations. Artifacts need to point to jar | war | ear | rar archive.
Module artifact's configurations should match the moduleId specified in the plan, if plan exists.
stopOnFailure
protected boolean stopOnFailure
- Whether to stop or proceed when errors and failures are encountered
ModuleMojoSupport
public ModuleMojoSupport()
getDeploymentManager
protected DeploymentManager getDeploymentManager()
throws IOException,
DeploymentManagerCreationException
- Get a deployment manager; if the manager was previosuly initialized then that cached instance is used.
- Returns:
- Deployment manager instance; never null
- Throws:
IOException
DeploymentManagerCreationException
waitFor
protected DeploymentStatus waitFor(ProgressObject progress)
throws InterruptedException
- Waits for the given progress to stop running.
- Parameters:
progress
- The progress object to wait for.
- Returns:
- The status of the deployment; never null
- Throws:
InterruptedException
getModuleId
protected String getModuleId(org.codehaus.mojo.pluginsupport.util.ArtifactItem item)
- Returns the Geronimo moduleId for the given artifact.
- Parameters:
item
- The artifact item to get the moduleId for.
- Returns:
- The moduleId of the given artifact item.
getNonRunningModules
protected TargetModuleID[] getNonRunningModules(TargetModuleID[] moduleIds)
throws Exception
- Given a list of modules, return a list of non-running ones.
- Parameters:
moduleIds
- The list of modules to check
- Returns:
- The list of modules that are not running
- Throws:
Exception
isModuleStarted
protected boolean isModuleStarted(String moduleId)
throws Exception
- Check if the given module is started.
- Parameters:
moduleId
- The module ID to check
- Returns:
- True if the module for this ID is started.
- Throws:
Exception
findModules
protected TargetModuleID[] findModules(String moduleId,
TargetModuleID[] targetIds)
startModule
protected void startModule()
throws Exception
- Throws:
Exception
stopModule
protected void stopModule()
throws Exception
- Throws:
Exception
undeployModule
protected void undeployModule()
throws Exception
- Throws:
Exception
logModules
protected void logModules(TargetModuleID[] targetIds)
logModules
protected void logModules(TargetModuleID[] targetIds,
String pad)
Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.