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:
AbstractScmReleaseMojo, CleanReleaseMojo, PerformReleaseMojo, UpdateVersionsMojo

public abstract class AbstractReleaseMojo extends org.apache.maven.plugin.AbstractMojo
Base class with shared configuration.
Version:
$Id$
  • Field Details

    • basedir

      @Parameter(defaultValue="${basedir}", readonly=true, required=true) private File basedir
    • settings

      @Parameter(defaultValue="${settings}", readonly=true, required=true) private org.apache.maven.settings.Settings settings
    • project

      @Parameter(defaultValue="${project}", readonly=true, required=true) protected org.apache.maven.project.MavenProject project
    • releaseManager

      @Component protected ReleaseManager releaseManager
    • arguments

      @Parameter(alias="prepareVerifyArgs", property="arguments") private String arguments
      Additional arguments to pass to the Maven executions, separated by spaces.
    • pomFileName

      @Parameter(property="pomFileName", defaultValue="${project.file.name}") private String pomFileName
      The file name of the POM to execute any goals against. As of version 3.0.0, this defaults to the name of POM file of the project being built.
    • reactorProjects

      @Parameter(defaultValue="${reactorProjects}", readonly=true, required=true) private List<org.apache.maven.project.MavenProject> reactorProjects
    • mavenHome

      @Parameter(defaultValue="${maven.home}") private File mavenHome
      The M2_HOME parameter to use for forked Maven invocations.
      Since:
      2.0-beta-8
    • javaHome

      @Parameter(defaultValue="${java.home}") private File javaHome
      The JAVA_HOME parameter to use for forked Maven invocations.
      Since:
      2.0-beta-8
    • localRepoDirectory

      @Parameter(defaultValue="${maven.repo.local}") private File localRepoDirectory
      The command-line local repository directory in use for this build (if specified).
      Since:
      2.0-beta-8
    • mavenExecutorId

      @Parameter(defaultValue="invoker", property="mavenExecutorId") private String mavenExecutorId
      Role hint of the MavenExecutor implementation to use.
      Since:
      2.0-beta-8
    • session

      @Parameter(defaultValue="${session}", readonly=true, required=true) protected org.apache.maven.execution.MavenSession session
      Since:
      2.0
    • releaseStrategyId

      @Parameter(defaultValue="default", property="releaseStrategyId") private String releaseStrategyId
      The role-hint for the Strategy implementation used to specify the phases per goal.
      Since:
      3.0.0
      See Also:
  • Constructor Details

    • AbstractReleaseMojo

      public AbstractReleaseMojo()
  • Method Details

    • getReleaseEnvironment

      protected ReleaseEnvironment getReleaseEnvironment()
      Gets the environment settings configured for this release.
      Returns:
      The release environment, never null.
    • createReleaseDescriptor

      protected ReleaseDescriptorBuilder createReleaseDescriptor()
      Creates the release descriptor from the various goal parameters.
      Returns:
      The release descriptor, never null.
    • getAdditionalProfiles

      protected String getAdditionalProfiles()
      Gets the comma separated list of additional profiles for the release build.
      Returns:
      additional profiles to enable during release
    • setReleaseManager

      void setReleaseManager(ReleaseManager releaseManager)
      Sets the component used to perform release actions.
      Parameters:
      releaseManager - The release manager implementation to use, must not be null.
    • getSettings

      org.apache.maven.settings.Settings getSettings()
      Gets the effective settings for this build.
      Returns:
      The effective settings for this build, never null.
    • getBasedir

      protected final File getBasedir()
    • setBasedir

      public void setBasedir(File basedir)
      Sets the base directory of the build.
      Parameters:
      basedir - The build's base directory, must not be null.
    • setPomFileName

      public void setPomFileName(String pomFileName)
    • getReactorProjects

      public List<org.apache.maven.project.MavenProject> getReactorProjects()
      Gets the list of projects in the build reactor.
      Returns:
      The list of reactor project, never null.
    • addArgument

      protected void addArgument(String argument)
      Add additional arguments.
      Parameters:
      argument - The argument to add, must not be null.
    • getCommonBasedir

      static Path getCommonBasedir(List<org.apache.maven.project.MavenProject> reactorProjects) throws IOException
      Throws:
      IOException