continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From epunza...@apache.org
Subject svn commit: r440676 - /maven/continuum/branches/release-integration/maven/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/MapVersionsPhase.java
Date Wed, 06 Sep 2006 10:10:45 GMT
Author: epunzalan
Date: Wed Sep  6 03:10:44 2006
New Revision: 440676

URL: http://svn.apache.org/viewvc?view=rev&rev=440676
Log:
Adding support for non-interactive supply of releaseand development versions

Modified:
    maven/continuum/branches/release-integration/maven/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/MapVersionsPhase.java

Modified: maven/continuum/branches/release-integration/maven/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/MapVersionsPhase.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/release-integration/maven/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/MapVersionsPhase.java?view=diff&rev=440676&r1=440675&r2=440676
==============================================================================
--- maven/continuum/branches/release-integration/maven/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/MapVersionsPhase.java
(original)
+++ maven/continuum/branches/release-integration/maven/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/MapVersionsPhase.java
Wed Sep  6 03:10:44 2006
@@ -29,6 +29,7 @@
 
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 /**
  * Map projects to their new versions after release / into the next development cycle.
@@ -97,6 +98,14 @@
                         nextVersion = prompter.prompt( "What is the new development version
for \"" +
                             project.getName() + "\"? (" + projectId + ")", nextVersion );
                     }
+                    else
+                    {
+                        Map devVersions = releaseDescriptor.getDevelopmentVersions();
+                        if ( devVersions.containsKey( projectId ) )
+                        {
+                            nextVersion = devVersions.remove( projectId ).toString();
+                        }
+                    }
 
                     releaseDescriptor.mapDevelopmentVersion( projectId, nextVersion );
                 }
@@ -113,6 +122,14 @@
                         nextVersion = prompter.prompt(
                             "What is the release version for \"" + project.getName() + "\"?
(" + projectId + ")",
                             nextVersion );
+                    }
+                    else
+                    {
+                        Map relVersions = releaseDescriptor.getReleaseVersions();
+                        if ( relVersions.containsKey( projectId ) )
+                        {
+                            nextVersion = relVersions.remove( projectId ).toString();
+                        }
                     }
 
                     releaseDescriptor.mapReleaseVersion( projectId, nextVersion );



Mime
View raw message