Class MapVersionsPhase

  • All Implemented Interfaces:
    ReleasePhase, org.codehaus.plexus.logging.LogEnabled

    public class MapVersionsPhase
    extends AbstractReleasePhase
    Map projects to their new versions after release / into the next development cycle. The map-phases per goal are:
    release:prepare
    map-release-versions + map-development-versions; RD.isBranchCreation() = false
    release:branch
    map-branch-versions + map-development-versions; RD.isBranchCreation() = true
    release:update-versions
    map-development-versions; RD.isBranchCreation() = false

    MapVersionsPhase fieldmap-release-versionsmap-branch-versions map-development-versions
    convertToSnapshot false true true
    convertToBranch false true false
    • Field Detail

      • resourceBundle

        private java.util.ResourceBundle resourceBundle
      • convertToSnapshot

        private boolean convertToSnapshot
        Whether to convert to a snapshot or a release.
      • convertToBranch

        private boolean convertToBranch
        Whether to convert to a snapshot or a release.
      • prompter

        private org.codehaus.plexus.components.interactivity.Prompter prompter
        Component used to prompt for input.
      • versionPolicies

        private java.util.Map<java.lang.String,​VersionPolicy> versionPolicies
        Component used for custom or default version policy
    • Constructor Detail

      • MapVersionsPhase

        public MapVersionsPhase()
    • Method Detail

      • setPrompter

        void setPrompter​(org.codehaus.plexus.components.interactivity.Prompter prompter)
      • execute

        public ReleaseResult execute​(ReleaseDescriptor releaseDescriptor,
                                     ReleaseEnvironment releaseEnvironment,
                                     java.util.List<org.apache.maven.project.MavenProject> reactorProjects)
                              throws ReleaseExecutionException
        Description copied from interface: ReleasePhase
        Execute the phase.
        Parameters:
        releaseDescriptor - the configuration to use
        releaseEnvironment - the environmental configuration, such as Maven settings, Maven home, etc.
        reactorProjects - the reactor projects
        Returns:
        the release result
        Throws:
        ReleaseExecutionException - an exception during the execution of the phase
      • getDevelopmentVersion

        private java.lang.String getDevelopmentVersion​(java.lang.String projectId,
                                                       ReleaseDescriptor releaseDescriptor)
      • getReleaseVersion

        private java.lang.String getReleaseVersion​(java.lang.String projectId,
                                                   ReleaseDescriptor releaseDescriptor)
      • getMapversionPromptKey

        private java.lang.String getMapversionPromptKey​(ReleaseDescriptor releaseDescriptor)
      • simulate

        public ReleaseResult simulate​(ReleaseDescriptor releaseDescriptor,
                                      ReleaseEnvironment releaseEnvironment,
                                      java.util.List<org.apache.maven.project.MavenProject> reactorProjects)
                               throws ReleaseExecutionException
        Description copied from interface: ReleasePhase
        Simulate the phase, but don't make any changes to the project.
        Parameters:
        releaseDescriptor - the configuration to use
        releaseEnvironment - the environmental configuration, such as Maven settings, Maven home, etc.
        reactorProjects - the reactor projects
        Returns:
        the release result
        Throws:
        ReleaseExecutionException - an exception during the execution of the phase
      • getResourceBundle

        private java.util.ResourceBundle getResourceBundle​(java.util.Locale locale)