Package org.apache.maven.plugins.release
Class PerformReleaseMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.release.AbstractReleaseMojo
-
- org.apache.maven.plugins.release.PerformReleaseMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
StageReleaseMojo
@Mojo(name="perform", aggregator=true, requiresProject=false) public class PerformReleaseMojo extends AbstractReleaseMojo
Perform a release from SCM, either from a specified tag, or the tag representing the previous release in the working copy created by release:prepare. For more info see https://maven.apache.org/plugins/maven-release-plugin/examples/perform-release.html.- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
connectionUrl
The SCM URL to checkout from.private boolean
dryRun
Dry run: don't checkout anything from the scm repository, or modify the checkout.(package private) java.lang.String
goals
A space separated list of goals to execute on deployment.private boolean
localCheckout
Use a local checkout instead of doing a checkout from the upstream repository.private java.lang.String
password
The SCM password to use.private java.util.Map<java.lang.String,java.lang.String>
providerImplementations
Add a new or overwrite the default implementation per provider.private java.lang.String
releaseProfiles
Comma separated profiles to enable on deployment, in addition to active profiles for project execution.private org.apache.maven.scm.manager.ScmManager
scmManager
The SCM manager.private boolean
useReleaseProfile
Deprecated.The release profile will be removed from future versions of the super POMprivate java.lang.String
username
The SCM username to use.private java.io.File
workingDirectory
The checkout directory.-
Fields inherited from class org.apache.maven.plugins.release.AbstractReleaseMojo
project, releaseManager, session
-
-
Constructor Summary
Constructors Constructor Description PerformReleaseMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
createGoals()
Just here so it may be overridden by StageReleaseMojovoid
execute()
protected java.lang.String
getAdditionalProfiles()
Gets the comma separated list of additional profiles for the release build.(package private) void
setDeploymentRepository()
Just here so it may be overridden by StageReleaseMojo-
Methods inherited from class org.apache.maven.plugins.release.AbstractReleaseMojo
addArgument, createReleaseDescriptor, getBasedir, getCommonBasedir, getReactorProjects, getReleaseEnvironment, getSettings, setBasedir, setPomFileName, setReleaseManager
-
-
-
-
Field Detail
-
goals
@Parameter(property="goals") java.lang.String goals
A space separated list of goals to execute on deployment. Default value is eitherdeploy
ordeploy site-deploy
, if the project has a <distributionManagement>/<site> element.
-
releaseProfiles
@Parameter(property="releaseProfiles") private java.lang.String releaseProfiles
Comma separated profiles to enable on deployment, in addition to active profiles for project execution.- Since:
- 2.0-beta-8
-
workingDirectory
@Parameter(defaultValue="${project.build.directory}/checkout", property="workingDirectory", required=true) private java.io.File workingDirectory
The checkout directory.
-
connectionUrl
@Parameter(property="connectionUrl") private java.lang.String connectionUrl
The SCM URL to checkout from. If omitted, the one from therelease.properties
file is used, followed by the URL from the current POM.
-
localCheckout
@Parameter(defaultValue="false", property="localCheckout") private boolean localCheckout
Use a local checkout instead of doing a checkout from the upstream repository. ATTENTION: This will only work with distributed SCMs which support the file:// protocol like e.g. git, jgit or hg! TODO: we should think about having the defaults for the various SCM providers provided via modello!- Since:
- 2.0 for release:perform and 2.5.2 for release:stage
-
username
@Parameter(property="username") private java.lang.String username
The SCM username to use.
-
password
@Parameter(property="password") private java.lang.String password
The SCM password to use.
-
useReleaseProfile
@Parameter(defaultValue="false", property="useReleaseProfile") @Deprecated private boolean useReleaseProfile
Deprecated.The release profile will be removed from future versions of the super POMWhether to use the release profile that adds sources and javadocs to the released artifact, if appropriate. If set to true, the release plugin sets the property "performRelease" to true, which activates the profile "release-profile", which is inherited from the super pom.
-
dryRun
@Parameter(defaultValue="false", property="dryRun") private boolean dryRun
Dry run: don't checkout anything from the scm repository, or modify the checkout. The goals (by default at leastdeploy
) will not be executed.
-
providerImplementations
@Parameter private java.util.Map<java.lang.String,java.lang.String> providerImplementations
Add a new or overwrite the default implementation per provider. The key is the scm prefix and the value is the role hint of theScmProvider
.- Since:
- 2.5.3
- See Also:
ScmManager.setScmProviderImplementation(String, String)
-
scmManager
@Component private org.apache.maven.scm.manager.ScmManager scmManager
The SCM manager.
-
-
Method Detail
-
getAdditionalProfiles
protected java.lang.String getAdditionalProfiles()
Description copied from class:AbstractReleaseMojo
Gets the comma separated list of additional profiles for the release build.- Overrides:
getAdditionalProfiles
in classAbstractReleaseMojo
- Returns:
- additional profiles to enable during release
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
setDeploymentRepository
void setDeploymentRepository()
Just here so it may be overridden by StageReleaseMojo
-
createGoals
void createGoals()
Just here so it may be overridden by StageReleaseMojo
-
-