org.apache.geronimo.genesis.ant
Class JavaLauncherMojoSupport

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.geronimo.genesis.MojoSupport
          extended by org.apache.geronimo.genesis.ant.AntMojoSupport
              extended by org.apache.geronimo.genesis.ant.JavaLauncherMojoSupport
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

public abstract class JavaLauncherMojoSupport
extends AntMojoSupport

Support for mojos that launch Java processes.

Version:
$Rev: 463461 $ $Date: 2006-10-12 15:11:08 -0700 (Thu, 12 Oct 2006) $

Field Summary
protected  org.apache.maven.artifact.repository.ArtifactRepository artifactRepository
           
protected  boolean background
          Flag to control if we background the process or block Maven execution.
protected  File baseWorkingDirectory
          The base working directory where process will be started from, a sub-directory the process name will be used for the effective working directory.
protected  boolean logOutput
          Enable logging mode.
protected  String options
          A comma seperated list of optionSets to enabled.
protected  OptionSet[] optionSets
          An array of option sets which can be enabled by setting options.
protected  Map pluginArtifactMap
          Map of of plugin artifacts.
protected  org.apache.maven.project.MavenProject project
          The maven project.
protected  int timeout
          Timeout for the process in seconds.
 
Fields inherited from class org.apache.geronimo.genesis.ant.AntMojoSupport
ant
 
Fields inherited from class org.apache.geronimo.genesis.MojoSupport
container, log
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
JavaLauncherMojoSupport()
           
 
Method Summary
protected  void appendArtifact(org.apache.tools.ant.types.Path classpath, org.apache.maven.artifact.Artifact artifact)
           
protected  void appendArtifactFile(org.apache.tools.ant.types.Path classpath, String name)
           
protected  void customizeJava(org.apache.tools.ant.taskdefs.Java java)
           
protected  void doExecute()
          Sub-class should override to provide custom execution logic.
protected  org.apache.maven.artifact.repository.ArtifactRepository getArtifactRepository()
          Get the artifact repository.
protected abstract  String getClassName()
           
protected  File getLogFile()
           
protected  org.apache.maven.artifact.Artifact getPluginArtifact(String name)
           
protected abstract  String getProcessName()
           
protected  String getProcessTitle()
           
protected  org.apache.maven.project.MavenProject getProject()
          Get the Maven project.
protected  File getWorkingDirectory()
           
protected abstract  void setClassPath(org.apache.tools.ant.types.Path classpath)
           
protected  boolean verifyProcessStarted()
           
 
Methods inherited from class org.apache.geronimo.genesis.ant.AntMojoSupport
createFileSet, createTask, inheritProperties, init, initAntLogger, mkdir, setProperty, setSystemProperty, setSystemProperty
 
Methods inherited from class org.apache.geronimo.genesis.MojoSupport
contextualize, createArtifact, execute, 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
 

Field Detail

baseWorkingDirectory

protected File baseWorkingDirectory
The base working directory where process will be started from, a sub-directory the process name will be used for the effective working directory.


logOutput

protected boolean logOutput
Enable logging mode.


background

protected boolean background
Flag to control if we background the process or block Maven execution.


timeout

protected int timeout
Timeout for the process in seconds.


optionSets

protected OptionSet[] optionSets
An array of option sets which can be enabled by setting options.


options

protected String options
A comma seperated list of optionSets to enabled.


pluginArtifactMap

protected Map pluginArtifactMap
Map of of plugin artifacts.


project

protected org.apache.maven.project.MavenProject project
The maven project.


artifactRepository

protected org.apache.maven.artifact.repository.ArtifactRepository artifactRepository
Constructor Detail

JavaLauncherMojoSupport

public JavaLauncherMojoSupport()
Method Detail

doExecute

protected void doExecute()
                  throws Exception
Description copied from class: MojoSupport
Sub-class should override to provide custom execution logic.

Overrides:
doExecute in class MojoSupport
Throws:
Exception - Execution failed

getPluginArtifact

protected org.apache.maven.artifact.Artifact getPluginArtifact(String name)
                                                        throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

appendArtifactFile

protected void appendArtifactFile(org.apache.tools.ant.types.Path classpath,
                                  String name)
                           throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

appendArtifact

protected void appendArtifact(org.apache.tools.ant.types.Path classpath,
                              org.apache.maven.artifact.Artifact artifact)
                       throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

getProject

protected org.apache.maven.project.MavenProject getProject()
Description copied from class: MojoSupport
Get the Maven project.

Sub-class must overridde to provide access.

Overrides:
getProject in class MojoSupport
Returns:
The maven project; never null

getArtifactRepository

protected org.apache.maven.artifact.repository.ArtifactRepository getArtifactRepository()
Description copied from class: MojoSupport
Get the artifact repository.

Sub-class must overridde to provide access.

Overrides:
getArtifactRepository in class MojoSupport
Returns:
An artifact repository; never null

getProcessName

protected abstract String getProcessName()

getProcessTitle

protected String getProcessTitle()

getWorkingDirectory

protected File getWorkingDirectory()

getLogFile

protected File getLogFile()

getClassName

protected abstract String getClassName()

setClassPath

protected abstract void setClassPath(org.apache.tools.ant.types.Path classpath)
                              throws Exception
Throws:
Exception

customizeJava

protected void customizeJava(org.apache.tools.ant.taskdefs.Java java)
                      throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

verifyProcessStarted

protected boolean verifyProcessStarted()
                                throws Exception
Throws:
Exception


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.