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:
AbstractScmReadReleaseMojo,CleanReleaseMojo,UpdateVersionsMojo
public abstract class AbstractReleaseMojo
extends org.apache.maven.plugin.AbstractMojo
Base class with shared configuration.
- Author:
- Brett Porter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.maven.project.MavenProjectprotected ReleaseManagerprotected org.apache.maven.execution.MavenSessionFields 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 Fileprotected org.apache.maven.project.MavenProjectonly 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 ReleaseEnvironmentGets the environment settings configured for this release.voidsetBasedir(File basedir) Sets the base directory of the build.voidsetPomFileName(String pomFileName) 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
-
project
@Parameter(defaultValue="${project}", readonly=true, required=true) protected org.apache.maven.project.MavenProject project -
session
@Parameter(defaultValue="${session}", readonly=true, required=true) protected org.apache.maven.execution.MavenSession session- Since:
- 2.0
-
releaseManager
-
-
Constructor Details
-
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.
-