org.apache.geronimo.mavenplugins.geronimo.server
Class InstallerMojoSupport

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.server.InstallerMojoSupport
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
InstallAssemblyMojo, StartServerMojo

public abstract class InstallerMojoSupport
extends ReportingMojoSupport

Common assembly install support.

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

Field Summary
protected  AssemblyConfig[] assemblies
          List of assembly artifact configurations.
protected  File assemblyArchive
          A file which points to a specific assembly ZIP archive.
protected  String assemblyId
          Identifer of the assembly configuration to use.
protected  String defaultAssemblyId
          The default assemblyId to use when no assemblyId configured.
protected  File geronimoHome
          The directory where the assembly has been installed to.
protected static int INSTALL_ALREADY_EXISTS
           
protected static int INSTALL_FROM_ARTIFACT
           
protected static int INSTALL_FROM_FILE
           
protected  File installDirectory
          Directory to install the assembly into.
protected  int installType
           
protected  boolean refresh
          Enable forced install refresh.
 
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
InstallerMojoSupport()
           
 
Method Summary
protected  org.apache.maven.artifact.Artifact getAssemblyArtifact()
          Selects the assembly artifact tp be used for installation.
protected  void init()
           
protected  void installAssembly()
          Performs assembly installation unless the install type is pre-existing.
 
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, 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

refresh

protected boolean refresh
Enable forced install refresh.


assemblies

protected AssemblyConfig[] assemblies
List of assembly artifact configurations. Artifacts need to point to ZIP archives.


assemblyId

protected String assemblyId
Identifer of the assembly configuration to use.


defaultAssemblyId

protected String defaultAssemblyId
The default assemblyId to use when no assemblyId configured.


assemblyArchive

protected File assemblyArchive
A file which points to a specific assembly ZIP archive. If this parameter is set, then it will be used instead of from the assemblies configuration.


installDirectory

protected File installDirectory
Directory to install the assembly into.


geronimoHome

protected File geronimoHome
The directory where the assembly has been installed to. Normally this value is detected, but if it is set, then it is assumed to be the location where a pre-installed assembly exists and no installation will be done.


INSTALL_FROM_ARTIFACT

protected static final int INSTALL_FROM_ARTIFACT
See Also:
Constant Field Values

INSTALL_FROM_FILE

protected static final int INSTALL_FROM_FILE
See Also:
Constant Field Values

INSTALL_ALREADY_EXISTS

protected static final int INSTALL_ALREADY_EXISTS
See Also:
Constant Field Values

installType

protected int installType
Constructor Detail

InstallerMojoSupport

public InstallerMojoSupport()
Method Detail

init

protected void init()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

getAssemblyArtifact

protected org.apache.maven.artifact.Artifact getAssemblyArtifact()
                                                          throws org.apache.maven.plugin.MojoExecutionException
Selects the assembly artifact tp be used for installation.

Returns:
The assembly artifact selected to be installed.
Throws:
org.apache.maven.plugin.MojoExecutionException - Failed to select assembly artifact

installAssembly

protected void installAssembly()
                        throws Exception
Performs assembly installation unless the install type is pre-existing.

Throws:
Exception


Copyright © 2006 Apache Software Foundation. All Rights Reserved.