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
FieldsModifier and TypeFieldDescriptionprivate String
The SCM URL to checkout from.private boolean
Dry run: don't checkout anything from the scm repository, or modify the checkout.(package private) String
A space separated list of goals to execute on deployment.private boolean
Use a local checkout instead of doing a checkout from the upstream repository.private String
The SCM password to use.Add a new or overwrite the default implementation per provider.private String
Comma separated profiles to enable on deployment, in addition to active profiles for project execution.private org.apache.maven.scm.manager.ScmManager
The SCM manager.private boolean
Deprecated.The release profile will be removed from future versions of the super POMprivate String
The SCM username to use.private File
The checkout directory.Fields inherited from class org.apache.maven.plugins.release.AbstractReleaseMojo
project, releaseManager, session
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.maven.plugins.release.AbstractReleaseMojo
addArgument, createReleaseDescriptor, getBasedir, getCommonBasedir, getReactorProjects, getReleaseEnvironment, getSettings, setBasedir, setPomFileName, setReleaseManager
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
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
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 File workingDirectoryThe checkout directory. -
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 localCheckoutUse 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
The SCM username to use. -
password
The SCM password to use. -
useReleaseProfile
@Parameter(defaultValue="false", property="useReleaseProfile") @Deprecated private boolean useReleaseProfileDeprecated.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 dryRunDry run: don't checkout anything from the scm repository, or modify the checkout. The goals (by default at leastdeploy
) will not be executed. -
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
@Component private org.apache.maven.scm.manager.ScmManager scmManagerThe SCM manager.
-
-
Constructor Details
-
PerformReleaseMojo
public PerformReleaseMojo()
-
-
Method Details
-
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
-