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

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.pluginsupport.MojoSupport
          extended by org.codehaus.mojo.pluginsupport.ant.AntMojoSupport
              extended by org.apache.geronimo.mavenplugins.geronimo.GeronimoMojoSupport
                  extended by org.apache.geronimo.mavenplugins.geronimo.reporting.ReportingMojoSupport
                      extended by org.apache.geronimo.mavenplugins.geronimo.server.InstallerMojoSupport
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Direct Known Subclasses:
InstallAssemblyMojo, StartServerMojo

public abstract class InstallerMojoSupport
extends ReportingMojoSupport

Common assembly install support.


Nested Class Summary
protected static class InstallerMojoSupport.InstallType
           
 
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  File installDirectory
          Directory to install the assembly into.
protected  InstallerMojoSupport.InstallType installType
           
protected  boolean refresh
          Enable forced install refresh.
 
Fields inherited from class org.apache.geronimo.mavenplugins.geronimo.reporting.ReportingMojoSupport
logFile, logOutput, logOutputDirectory, reporters, stopOnFailure
 
Fields inherited from class org.apache.geronimo.mavenplugins.geronimo.GeronimoMojoSupport
artifactRepository, hostname, password, port, project, username
 
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
 
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, getFullClassName, getLogFile
 
Methods inherited from class org.apache.geronimo.mavenplugins.geronimo.GeronimoMojoSupport
getArtifactRepository, getProject
 
Methods inherited from class org.codehaus.mojo.pluginsupport.ant.AntMojoSupport
createFileSet, createTask, inheritProperties, 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
 

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.


installType

protected InstallerMojoSupport.InstallType installType
Constructor Detail

InstallerMojoSupport

public InstallerMojoSupport()
Method Detail

init

protected void init()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Overrides:
init in class org.codehaus.mojo.pluginsupport.ant.AntMojoSupport
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 © 2003-2007 Apache Software Foundation. All Rights Reserved.