Class AbstractReleaseMojo

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String arguments
      Additional arguments to pass to the Maven executions, separated by spaces.
      private java.io.File basedir  
      private java.io.File javaHome
      The JAVA_HOME parameter to use for forked Maven invocations.
      private java.io.File localRepoDirectory
      The command-line local repository directory in use for this build (if specified).
      private java.lang.String mavenExecutorId
      Role hint of the MavenExecutor implementation to use.
      private java.io.File mavenHome
      The M2_HOME parameter to use for forked Maven invocations.
      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.List<org.apache.maven.project.MavenProject> reactorProjects  
      protected ReleaseManager releaseManager  
      private java.lang.String releaseStrategyId
      The role-hint for the Strategy implementation used to specify the phases per goal.
      protected org.apache.maven.execution.MavenSession session  
      private org.apache.maven.settings.Settings settings  
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addArgument​(java.lang.String argument)
      Add additional arguments.
      protected ReleaseDescriptorBuilder createReleaseDescriptor()
      Creates the release descriptor from the various goal parameters.
      protected java.lang.String getAdditionalProfiles()
      Gets the comma separated list of additional profiles for the release build.
      protected java.io.File getBasedir()  
      (package private) static java.nio.file.Path getCommonBasedir​(java.util.List<org.apache.maven.project.MavenProject> reactorProjects)  
      java.util.List<org.apache.maven.project.MavenProject> getReactorProjects()
      Gets the list of projects in the build reactor.
      protected ReleaseEnvironment getReleaseEnvironment()
      Gets the environment settings configured for this release.
      (package private) org.apache.maven.settings.Settings getSettings()
      Gets the effective settings for this build.
      void setBasedir​(java.io.File basedir)
      Sets the base directory of the build.
      void setPomFileName​(java.lang.String pomFileName)  
      (package private) void setReleaseManager​(ReleaseManager releaseManager)
      Sets the component used to perform release actions.
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.maven.plugin.Mojo

        execute
    • Field Detail

      • basedir

        @Parameter(defaultValue="${basedir}",
                   readonly=true,
                   required=true)
        private java.io.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
      • arguments

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

        @Parameter(property="pomFileName",
                   defaultValue="${project.file.name}")
        private java.lang.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 java.util.List<org.apache.maven.project.MavenProject> reactorProjects
      • mavenHome

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

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

        @Parameter(defaultValue="${maven.repo.local}")
        private java.io.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 java.lang.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 java.lang.String releaseStrategyId
        The role-hint for the Strategy implementation used to specify the phases per goal.
        Since:
        3.0.0
        See Also:
        DefaultStrategy
    • Constructor Detail

      • AbstractReleaseMojo

        public AbstractReleaseMojo()
    • Method Detail

      • 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 java.lang.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 java.io.File getBasedir()
      • setBasedir

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

        public void setPomFileName​(java.lang.String pomFileName)
      • getReactorProjects

        public java.util.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​(java.lang.String argument)
        Add additional arguments.
        Parameters:
        argument - The argument to add, must not be null.
      • getCommonBasedir

        static java.nio.file.Path getCommonBasedir​(java.util.List<org.apache.maven.project.MavenProject> reactorProjects)
                                            throws java.io.IOException
        Throws:
        java.io.IOException