org.apache.geronimo.mavenplugins.geronimo.module
Class ModuleMojoSupport

java.lang.Object
  extended byorg.apache.maven.plugin.AbstractMojo
      extended byorg.apache.geronimo.genesis.MojoSupport
          extended byorg.apache.geronimo.genesis.AntMojoSupport
              extended byorg.apache.geronimo.mavenplugins.geronimo.GeronimoMojoSupport
                  extended byorg.apache.geronimo.mavenplugins.geronimo.reporting.ReportingMojoSupport
                      extended byorg.apache.geronimo.mavenplugins.geronimo.module.ModuleMojoSupport
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
DeployModuleMojo, ListModulesMojo, StartStopUndeployMojoSupport

public abstract class ModuleMojoSupport
extends ReportingMojoSupport

Support for mojos that operate on modules.

Version:
$Rev: 450613 $ $Date: 2006-09-27 15:45:46 -0700 (Wed, 27 Sep 2006) $

Field Summary
protected  ModuleConfig[] modules
          List of module artifact configurations.
 
Fields inherited from class org.apache.geronimo.mavenplugins.geronimo.reporting.ReportingMojoSupport
logFile, logOutput, logOutputDirectory, reporters
 
Fields inherited from class org.apache.geronimo.mavenplugins.geronimo.GeronimoMojoSupport
artifactFactory, artifactRepository, artifactResolver, hostname, password, port, project, username
 
Fields inherited from class org.apache.geronimo.genesis.AntMojoSupport
ant
 
Fields inherited from class org.apache.geronimo.genesis.MojoSupport
log
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ModuleMojoSupport()
           
 
Method Summary
protected  TargetModuleID[] findModules(String moduleId, TargetModuleID[] targetIds)
           
protected  DeploymentManager getDeploymentManager()
          Get a deployment manager; if the manager was previosuly initialized then that cached instance is used.
protected  String getModuleId(org.apache.geronimo.genesis.ArtifactItem item)
          Returns the Geronimo moduleId for the given artifact.
protected  boolean isModuleStarted(String moduleId)
          Check of the given module is started.
protected  void logModules(TargetModuleID[] targetIds)
           
protected  void logModules(TargetModuleID[] targetIds, String pad)
           
protected  void startModule()
           
protected  void stopModule()
           
protected  void undeployModule()
           
protected  DeploymentStatus waitFor(ProgressObject progress)
          Waits for the given progress to stop running.
 
Methods inherited from class org.apache.geronimo.mavenplugins.geronimo.reporting.ReportingMojoSupport
execute, getGoalName, getLogFile
 
Methods inherited from class org.apache.geronimo.mavenplugins.geronimo.GeronimoMojoSupport
getArtifactFactory, getArtifactRepository, getArtifactResolver, getProject
 
Methods inherited from class org.apache.geronimo.genesis.AntMojoSupport
createFileSet, createTask, inheritProperties, init, initAntLogger, mkdir, setProperty
 
Methods inherited from class org.apache.geronimo.genesis.MojoSupport
createArtifact, doExecute, getArtifact
 
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
 

Field Detail

modules

protected ModuleConfig[] modules
List of module artifact configurations. Artifacts need to point to jar | war | ear | rar archive.

Constructor Detail

ModuleMojoSupport

public ModuleMojoSupport()
Method Detail

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.apache.geronimo.genesis.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.

isModuleStarted

protected boolean isModuleStarted(String moduleId)
                           throws Exception
Check of 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 © 2006 Apache Software Foundation. All Rights Reserved.