Package org.apache.maven.plugins.release
Class AbstractReleaseMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.release.AbstractReleaseMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractScmReleaseMojo
,CleanReleaseMojo
,PerformReleaseMojo
,UpdateVersionsMojo
public abstract class AbstractReleaseMojo
extends org.apache.maven.plugin.AbstractMojo
Base class with shared configuration.
- Version:
- $Id$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
Additional arguments to pass to the Maven executions, separated by spaces.private File
private File
TheJAVA_HOME
parameter to use for forked Maven invocations.private File
The command-line local repository directory in use for this build (if specified).private String
Role hint of theMavenExecutor
implementation to use.private File
TheM2_HOME
parameter to use for forked Maven invocations.private String
The file name of the POM to execute any goals against.protected org.apache.maven.project.MavenProject
private List
<org.apache.maven.project.MavenProject> protected ReleaseManager
private String
The role-hint for theStrategy
implementation used to specify the phases per goal.protected org.apache.maven.execution.MavenSession
private org.apache.maven.settings.Settings
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addArgument
(String argument) Add additional arguments.protected ReleaseDescriptorBuilder
Creates the release descriptor from the various goal parameters.protected String
Gets the comma separated list of additional profiles for the release build.protected final File
(package private) static Path
getCommonBasedir
(List<org.apache.maven.project.MavenProject> reactorProjects) List
<org.apache.maven.project.MavenProject> Gets the list of projects in the build reactor.protected ReleaseEnvironment
Gets the environment settings configured for this release.(package private) org.apache.maven.settings.Settings
Gets the effective settings for this build.void
setBasedir
(File basedir) Sets the base directory of the build.void
setPomFileName
(String pomFileName) (package private) void
setReleaseManager
(ReleaseManager releaseManager) Sets the component used to perform release actions.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
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
-
Field Details
-
basedir
-
settings
@Parameter(defaultValue="${settings}", readonly=true, required=true) private org.apache.maven.settings.Settings settings -
project
@Parameter(defaultValue="${project}", readonly=true, required=true) protected org.apache.maven.project.MavenProject project -
releaseManager
-
arguments
Additional arguments to pass to the Maven executions, separated by spaces. -
pomFileName
The file name of the POM to execute any goals against. As of version 3.0.0, this defaults to the name of POM file of the project being built. -
reactorProjects
@Parameter(defaultValue="${reactorProjects}", readonly=true, required=true) private List<org.apache.maven.project.MavenProject> reactorProjects -
mavenHome
TheM2_HOME
parameter to use for forked Maven invocations.- Since:
- 2.0-beta-8
-
javaHome
TheJAVA_HOME
parameter to use for forked Maven invocations.- Since:
- 2.0-beta-8
-
localRepoDirectory
The command-line local repository directory in use for this build (if specified).- Since:
- 2.0-beta-8
-
mavenExecutorId
Role hint of theMavenExecutor
implementation to use.- Since:
- 2.0-beta-8
-
session
@Parameter(defaultValue="${session}", readonly=true, required=true) protected org.apache.maven.execution.MavenSession session- Since:
- 2.0
-
releaseStrategyId
The role-hint for theStrategy
implementation used to specify the phases per goal.- Since:
- 3.0.0
- See Also:
-
-
Constructor Details
-
AbstractReleaseMojo
public AbstractReleaseMojo()
-
-
Method Details
-
getReleaseEnvironment
Gets the environment settings configured for this release.- Returns:
- The release environment, never
null
.
-
createReleaseDescriptor
Creates the release descriptor from the various goal parameters.- Returns:
- The release descriptor, never
null
.
-
getAdditionalProfiles
Gets the comma separated list of additional profiles for the release build.- Returns:
- additional profiles to enable during release
-
getSettings
org.apache.maven.settings.Settings getSettings()Gets the effective settings for this build.- Returns:
- The effective settings for this build, never
null
.
-
getBasedir
-
setBasedir
Sets the base directory of the build.- Parameters:
basedir
- The build's base directory, must not benull
.
-
setPomFileName
-
getReactorProjects
Gets the list of projects in the build reactor.- Returns:
- The list of reactor project, never
null
.
-
addArgument
Add additional arguments.- Parameters:
argument
- The argument to add, must not benull
.
-
getCommonBasedir
static Path getCommonBasedir(List<org.apache.maven.project.MavenProject> reactorProjects) throws IOException - Throws:
IOException
-