org.apache.maven.plugins.release
Class AbstractReleaseMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugins.release.AbstractReleaseMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
BranchReleaseMojo, CleanReleaseMojo, PerformReleaseMojo, PrepareReleaseMojo, RollbackReleaseMojo, StageReleaseMojo, UpdateVersionsMojo

public abstract class AbstractReleaseMojo
extends org.apache.maven.plugin.AbstractMojo

Base class with shared configuration.

Version:
$Id: AbstractReleaseMojo.html 816525 2012-05-08 11:35:10Z hboutemy $
Author:
Brett Porter

Field Summary
protected  File basedir
           
protected  File javaHome
          The JAVA_HOME parameter to use for forked Maven invocations.
protected  File localRepoDirectory
          The command-line local repository directory in use for this build (if specified).
protected  String mavenExecutorId
          Role hint of the org.apache.maven.shared.release.exec.MavenExecutor implementation to use.
protected  File mavenHome
          The M2_HOME parameter to use for forked Maven invocations.
protected  org.apache.maven.project.MavenProject project
           
protected  List reactorProjects
           
protected  org.apache.maven.shared.release.ReleaseManager releaseManager
           
protected  org.apache.maven.settings.Settings settings
           
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractReleaseMojo()
           
 
Method Summary
protected  void addArgument(String argument)
          Add additional arguments.
protected  org.apache.maven.shared.release.config.ReleaseDescriptor createReleaseDescriptor()
          Creates the release descriptor from the various goal parameters.
 void execute()
          
protected  String getAdditionalProfiles()
          Gets the comma separated list of additional profiles for the release build.
 List getReactorProjects()
          Gets the list of projects in the build reactor.
protected  org.apache.maven.shared.release.env.ReleaseEnvironment getReleaseEnvironment()
          Gets the enviroment settings configured for this release.
 void setBasedir(File basedir)
          Sets the base directory of the build.
 
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

basedir

protected File basedir

settings

protected org.apache.maven.settings.Settings settings

project

protected org.apache.maven.project.MavenProject project

releaseManager

protected org.apache.maven.shared.release.ReleaseManager releaseManager

reactorProjects

protected List reactorProjects

mavenHome

protected File mavenHome
The M2_HOME parameter to use for forked Maven invocations.

Since:
2.0-beta-8

javaHome

protected File javaHome
The JAVA_HOME parameter to use for forked Maven invocations.

Since:
2.0-beta-8

localRepoDirectory

protected File localRepoDirectory
The command-line local repository directory in use for this build (if specified).

Since:
2.0-beta-8

mavenExecutorId

protected String mavenExecutorId
Role hint of the org.apache.maven.shared.release.exec.MavenExecutor implementation to use.

Since:
2.0-beta-8
Constructor Detail

AbstractReleaseMojo

public AbstractReleaseMojo()
Method Detail

getReleaseEnvironment

protected org.apache.maven.shared.release.env.ReleaseEnvironment getReleaseEnvironment()
Gets the enviroment settings configured for this release.

Returns:
The release environment, never null.

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException

Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

createReleaseDescriptor

protected org.apache.maven.shared.release.config.ReleaseDescriptor createReleaseDescriptor()
Creates the release descriptor from the various goal parameters.

Returns:
The release descriptor, never null.

getAdditionalProfiles

protected String getAdditionalProfiles()
Gets the comma separated list of additional profiles for the release build.

Returns:
additional profiles to enable during release

setBasedir

public void setBasedir(File basedir)
Sets the base directory of the build.

Parameters:
basedir - The build's base directory, must not be null.

getReactorProjects

public List getReactorProjects()
Gets the list of projects in the build reactor.

Returns:
The list of reactor project, never null.

addArgument

protected void addArgument(String argument)
Add additional arguments.

Parameters:
argument - The argument to add, must not be null.


Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.