public abstract class AbstractReleaseMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
arguments
Additional arguments to pass to the Maven executions, separated by spaces.
|
protected java.io.File |
basedir |
protected java.io.File |
javaHome
The JAVA_HOME parameter to use for forked Maven invocations.
|
private boolean |
localCheckout
Use a local checkout instead of doing a checkout from the upstream repository.
|
protected java.io.File |
localRepoDirectory
The command-line local repository directory in use for this build (if specified).
|
protected java.lang.String |
mavenExecutorId
Role hint of the
MavenExecutor implementation to use. |
protected java.io.File |
mavenHome
The M2_HOME parameter to use for forked Maven invocations.
|
private java.lang.String |
password
The SCM password to use.
|
private java.lang.String |
pomFileName
The file name of the POM to execute any goals against.
|
protected org.apache.maven.project.MavenProject |
project |
private java.util.Map |
providerImplementations
List of provider implementations.
|
private boolean |
pushChanges
Implemented with git will or not push changes to the upstream repository.
|
protected java.util.List |
reactorProjects |
protected ReleaseManager |
releaseManager |
private java.lang.String |
scmCommentPrefix
The message prefix to use for all SCM changes.
|
private org.apache.maven.scm.manager.ScmManager |
scmManager
The SCM manager.
|
protected org.apache.maven.execution.MavenSession |
session |
protected org.apache.maven.settings.Settings |
settings |
private java.lang.String |
tag
The SCM tag to use.
|
private java.lang.String |
tagBase
The tag base directory in SVN, you must define it if you don't use the standard svn layout (trunk/tags/branches).
|
private java.lang.String |
tagNameFormat
Format to use when generating the tag name if none is specified.
|
private java.lang.String |
username
The SCM username to use.
|
Constructor and Description |
---|
AbstractReleaseMojo() |
Modifier and Type | Method and Description |
---|---|
protected void |
addArgument(java.lang.String argument)
Add additional arguments.
|
protected ReleaseDescriptor |
createReleaseDescriptor()
Creates the release descriptor from the various goal parameters.
|
void |
execute() |
protected java.lang.String |
getAdditionalProfiles()
Gets the comma separated list of additional profiles for the release build.
|
java.util.List |
getReactorProjects()
Gets the list of projects in the build reactor.
|
protected ReleaseEnvironment |
getReleaseEnvironment()
Gets the enviroment settings configured for this release.
|
(package private) org.apache.maven.settings.Settings |
getSettings()
Gets the effective settings for this build.
|
protected void |
mergeCommandLineConfig(ReleaseDescriptor config,
ReleaseDescriptor sysPropertiesConfig)
This method takes some of the release configuration picked up from the command line system properties and copies
it into the release config object.
|
void |
setBasedir(java.io.File basedir)
Sets the base directory of the build.
|
(package private) void |
setReleaseManager(ReleaseManager releaseManager)
Sets the component used to perform release actions.
|
private java.lang.String username
private java.lang.String password
private java.lang.String tag
private java.lang.String tagNameFormat
@{...}
to reference the properties rather than ${...}
. The following properties are available:
groupId
or project.groupId
- The groupId of the root project.
artifactId
or project.artifactId
- The artifactId of the root project.
version
or project.version
- The release version of the root project.
private java.lang.String tagBase
http://svn.apache.org/repos/asf/maven/plugins/tags
. The URL is an SVN URL and does not
include the SCM provider and protocol.protected java.io.File basedir
protected org.apache.maven.settings.Settings settings
protected org.apache.maven.project.MavenProject project
protected ReleaseManager releaseManager
private java.lang.String arguments
private java.lang.String pomFileName
private java.lang.String scmCommentPrefix
protected java.util.List reactorProjects
private java.util.Map providerImplementations
protected java.io.File mavenHome
protected java.io.File javaHome
protected java.io.File localRepoDirectory
protected java.lang.String mavenExecutorId
MavenExecutor
implementation to use.private boolean localCheckout
private boolean pushChanges
true
by default to preserve backward compatibility.private org.apache.maven.scm.manager.ScmManager scmManager
protected org.apache.maven.execution.MavenSession session
protected ReleaseEnvironment getReleaseEnvironment()
null
.public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected ReleaseDescriptor createReleaseDescriptor()
null
.protected java.lang.String getAdditionalProfiles()
void setReleaseManager(ReleaseManager releaseManager)
releaseManager
- The release manager implementation to use, must not be null
.org.apache.maven.settings.Settings getSettings()
null
.public void setBasedir(java.io.File basedir)
basedir
- The build's base directory, must not be null
.public java.util.List getReactorProjects()
null
.protected void addArgument(java.lang.String argument)
argument
- The argument to add, must not be null
.protected void mergeCommandLineConfig(ReleaseDescriptor config, ReleaseDescriptor sysPropertiesConfig)
config
- The release configuration to merge the system properties into, must not be null
.sysPropertiesConfig
- The configuration from the system properties to merge in, must not be
null
.