Class AbstractScmReleaseMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.release.AbstractReleaseMojo
org.apache.maven.plugins.release.AbstractScmReleaseMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
BranchReleaseMojo, PrepareReleaseMojo, RollbackReleaseMojo

public abstract class AbstractScmReleaseMojo extends AbstractReleaseMojo
Abstract Mojo containing SCM parameters
  • Field Details

    • username

      @Parameter(property="username") private String username
      The SCM username to use.
    • password

      @Parameter(property="password") private String password
      The SCM password to use.
    • tag

      @Parameter(alias="releaseLabel", property="tag") private String tag
      The SCM tag to use.
    • tagNameFormat

      @Parameter(defaultValue="@{project.artifactId}-@{project.version}", property="tagNameFormat") private String tagNameFormat
      Format to use when generating the tag name if none is specified. Property interpolation is performed on the tag, but in order to ensure that the interpolation occurs during release, you must use @{...} 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.
      Since:
      2.2.0
    • tagBase

      @Parameter(property="tagBase") private String tagBase
      The tag base directory in SVN, you must define it if you don't use the standard svn layout (trunk/tags/branches). For example, http://svn.apache.org/repos/asf/maven/plugins/tags. The URL is an SVN URL and does not include the SCM provider and protocol.
    • scmCommentPrefix

      @Parameter(defaultValue="[maven-release-plugin] ", property="scmCommentPrefix") private String scmCommentPrefix
      The message prefix to use for all SCM changes.
      Since:
      2.0-beta-5
    • pushChanges

      @Parameter(defaultValue="true", property="pushChanges") private boolean pushChanges
      Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.
      Since:
      2.1
    • workItem

      @Parameter(property="workItem") private String workItem
      A workItem for SCMs like RTC, TFS etc, that may require additional information to perform a pushChange operation.
      Since:
      3.0.0
    • providerImplementations

      @Parameter private Map<String,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 the ScmProvider.
      Since:
      2.0-beta-6
      See Also:
      • ScmManager.setScmProviderImplementation(String, String)
    • scmManager

      @Component private org.apache.maven.scm.manager.ScmManager scmManager
      The SCM manager.
  • Constructor Details

    • AbstractScmReleaseMojo

      public AbstractScmReleaseMojo()
  • Method Details

    • 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
    • createReleaseDescriptor

      protected ReleaseDescriptorBuilder createReleaseDescriptor()
      Description copied from class: AbstractReleaseMojo
      Creates the release descriptor from the various goal parameters.
      Overrides:
      createReleaseDescriptor in class AbstractReleaseMojo
      Returns:
      The release descriptor, never null.
    • buildScm

      protected org.apache.maven.model.Scm buildScm(org.apache.maven.project.MavenProject project)