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 StringAdditional arguments to pass to the Maven executions, separated by spaces.private Fileprivate FileTheJAVA_HOMEparameter to use for forked Maven invocations.private FileThe command-line local repository directory in use for this build (if specified).private StringRole hint of theMavenExecutorimplementation to use.private FileTheM2_HOMEparameter to use for forked Maven invocations.private StringThe file name of the POM to execute any goals against.protected org.apache.maven.project.MavenProjectprivate List<org.apache.maven.project.MavenProject> protected ReleaseManagerprivate StringThe role-hint for theStrategyimplementation used to specify the phases per goal.protected org.apache.maven.execution.MavenSessionprivate org.apache.maven.settings.SettingsFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddArgument(String argument) Add additional arguments.protected ReleaseDescriptorBuilderCreates the release descriptor from the various goal parameters.protected StringGets the comma separated list of additional profiles for the release build.protected final File(package private) static PathgetCommonBasedir(List<org.apache.maven.project.MavenProject> reactorProjects) List<org.apache.maven.project.MavenProject> Gets the list of projects in the build reactor.protected ReleaseEnvironmentGets the environment settings configured for this release.(package private) org.apache.maven.settings.SettingsGets the effective settings for this build.voidsetBasedir(File basedir) Sets the base directory of the build.voidsetPomFileName(String pomFileName) (package private) voidsetReleaseManager(ReleaseManager releaseManager) Sets the component used to perform release actions.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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_HOMEparameter to use for forked Maven invocations.- Since:
- 2.0-beta-8
-
javaHome
TheJAVA_HOMEparameter 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 theMavenExecutorimplementation 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 theStrategyimplementation 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
-