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.
- Author:
- Brett Porter
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.apache.maven.project.MavenProject
protected ReleaseManager
protected org.apache.maven.execution.MavenSession
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
-
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
protected org.apache.maven.project.MavenProject
only used for unit tests in which some required values of the project would be nullList<org.apache.maven.project.MavenProject>
Gets the list of projects in the build reactor.protected ReleaseEnvironment
Gets the environment settings configured for this release.void
setBasedir
(File basedir) Sets the base directory of the build.void
setPomFileName
(String pomFileName) 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
-
project
@Parameter(defaultValue="${project}", readonly=true, required=true) protected org.apache.maven.project.MavenProject project -
releaseManager
-
session
@Parameter(defaultValue="${session}", readonly=true, required=true) protected org.apache.maven.execution.MavenSession session- Since:
- 2.0
-
-
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
-
getBasedir
-
setBasedir
Sets the base directory of the build.- Parameters:
basedir
- The build's base directory, must not benull
.
-
setPomFileName
-
getProject
protected org.apache.maven.project.MavenProject getProject()only used for unit tests in which some required values of the project would be null -
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
.
-