continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From epunza...@apache.org
Subject svn commit: r442453 - in /maven/continuum/branches/release-integration/continuum: continuum-release/src/main/java/org/apache/maven/continuum/release/ continuum-release/src/main/java/org/apache/maven/continuum/release/executors/ continuum-webapp/src/mai...
Date Tue, 12 Sep 2006 05:15:39 GMT
Author: epunzalan
Date: Mon Sep 11 22:15:38 2006
New Revision: 442453

URL: http://svn.apache.org/viewvc?view=rev&rev=442453
Log:
PR: CONTINUUM-727

fixed some bugs and some improvements on the feature

Modified:
    maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
    maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PrepareReleaseTaskExecutor.java
    maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PerformReleaseAction.java
    maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseProjectAction.java
    maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/webapp/prepareRelease.jsp
    maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/webapp/releaseProject.jsp

Modified: maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java?view=diff&rev=442453&r1=442452&r2=442453
==============================================================================
--- maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
(original)
+++ maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
Mon Sep 11 22:15:38 2006
@@ -19,9 +19,9 @@
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.release.tasks.PerformReleaseProjectTask;
 import org.apache.maven.continuum.release.tasks.PrepareReleaseProjectTask;
+import org.apache.maven.plugins.release.ReleaseManagerListener;
 import org.apache.maven.plugins.release.config.ReleaseDescriptor;
 import org.apache.maven.plugins.release.config.io.xpp3.ReleaseDescriptorXpp3Reader;
-import org.apache.maven.plugins.release.ReleaseManagerListener;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 import org.codehaus.plexus.taskqueue.TaskQueueException;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
@@ -29,11 +29,9 @@
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
-import java.util.HashMap;
+import java.util.Hashtable;
 import java.util.Map;
 import java.util.Properties;
-import java.util.Collections;
-import java.util.Hashtable;
 
 /**
  * @author Jason van Zyl
@@ -87,7 +85,7 @@
                          ContinuumReleaseManagerListener listener )
         throws ContinuumReleaseException
     {
-        ReleaseDescriptor descriptor = (ReleaseDescriptor) preparedReleases.get( releaseId
);
+        ReleaseDescriptor descriptor = (ReleaseDescriptor) getPreparedReleases().get( releaseId
);
         if ( descriptor != null )
         {
             perform( releaseId, descriptor, buildDirectory, goals, useReleaseProfile, listener
);
@@ -137,7 +135,7 @@
     {
         if ( preparedReleases == null )
         {
-            preparedReleases = new HashMap();
+            preparedReleases = new Hashtable();
         }
 
         return preparedReleases;
@@ -183,7 +181,7 @@
     {
         if ( listeners == null )
         {
-            listeners = Collections.synchronizedMap( new Hashtable() );
+            listeners = new Hashtable();
         }
 
         return listeners;

Modified: maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PrepareReleaseTaskExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PrepareReleaseTaskExecutor.java?view=diff&rev=442453&r1=442452&r2=442453
==============================================================================
--- maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PrepareReleaseTaskExecutor.java
(original)
+++ maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PrepareReleaseTaskExecutor.java
Mon Sep 11 22:15:38 2006
@@ -46,6 +46,8 @@
                                           false, false, listener );
 
             continuumReleaseManager.getPreparedReleases().put( prepareTask.getReleaseId(),
descriptor );
+
+            System.out.println( "========== new prepared release: " + prepareTask.getReleaseId()
+ "============" );
         }
         catch ( ReleaseExecutionException e )
         {

Modified: maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PerformReleaseAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PerformReleaseAction.java?view=diff&rev=442453&r1=442452&r2=442453
==============================================================================
--- maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PerformReleaseAction.java
(original)
+++ maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PerformReleaseAction.java
Mon Sep 11 22:15:38 2006
@@ -76,6 +76,23 @@
                                           "releases-" + System.currentTimeMillis() );
         performDirectory.mkdirs();
 
+        if ( releaseId == null )
+        {
+            ReleaseDescriptor descriptor = new ReleaseDescriptor();
+            descriptor.setScmSourceUrl( scmUrl );
+            descriptor.setScmUsername( scmUsername );
+            descriptor.setScmReleaseLabel( scmTag );
+            descriptor.setScmTagBase( scmTagBase );
+
+            String releaseId;
+            do
+            {
+                releaseId = String.valueOf( System.currentTimeMillis() );
+            }while ( releaseManager.getPreparedReleases().containsKey( releaseId ) );
+
+            releaseManager.getPreparedReleases().put( releaseId, descriptor );
+        }
+
         releaseManager.perform( releaseId, performDirectory, goals, useReleaseProfile, listener
);
 
         return "initialized";
@@ -102,7 +119,7 @@
         {
             releaseManager.getListeners().remove( releaseId );
 
-            return "finished";
+            status = "finished";
         }
 
         return status;

Modified: maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseProjectAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseProjectAction.java?view=diff&rev=442453&r1=442452&r2=442453
==============================================================================
--- maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseProjectAction.java
(original)
+++ maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseProjectAction.java
Mon Sep 11 22:15:38 2006
@@ -22,6 +22,8 @@
 import org.apache.maven.plugins.release.config.ReleaseDescriptor;
 import org.codehaus.plexus.util.StringUtils;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -44,6 +46,8 @@
 
     private Project project;
 
+    private List releaseList;
+
     public String promptReleaseGoal()
         throws Exception
     {
@@ -52,6 +56,8 @@
         String releaseId = ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId()
);
 
         ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
+
+        releaseList = new ArrayList( releaseManager.getPreparedReleases().values() );
 
         Map preparedReleases = releaseManager.getPreparedReleases();
         if ( preparedReleases.containsKey( releaseId ) )

Modified: maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/resources/xwork.xml?view=diff&rev=442453&r1=442452&r2=442453
==============================================================================
--- maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/resources/xwork.xml
(original)
+++ maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/resources/xwork.xml
Mon Sep 11 22:15:38 2006
@@ -303,8 +303,9 @@
         <param name="actionName">prepareRelease</param>
         <param name="projectId">${projectId}</param>
       </result>
-      <result name="performRelease">
+      <result name="performRelease" type="redirect-action">
         <param name="actionName">performRelease</param>
+        <param name="projectId">${projectId}</param>
       </result>
     </action>
 

Modified: maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/webapp/prepareRelease.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/webapp/prepareRelease.jsp?view=diff&rev=442453&r1=442452&r2=442453
==============================================================================
--- maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/webapp/prepareRelease.jsp
(original)
+++ maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/webapp/prepareRelease.jsp
Mon Sep 11 22:15:38 2006
@@ -25,22 +25,22 @@
           <h3><ww:property value="name"/></h3>
           <input type="hidden" name="projectKeys" value="<ww:property value="key"/>">
           <div class="axial">
-          <table border="1" cellspacing="2" cellpadding="3" width="100%">
-            <tr>
-              <th>Release Version*</th>
-              <td>
-                <input type=text name="relVersions"
-                       value="<ww:property value="release"/>" size="100">
-              </td>
-            </tr>
-            <tr>
-              <th>Next Development Version*</th>
-              <td>
-                <input type=text name="devVersions"
-                       value="<ww:property value="dev"/>" size="100">
-              </td>
-            </tr>
-           </table>
+            <table border="1" cellspacing="2" cellpadding="3" width="100%">
+              <tr>
+                <th>Release Version*</th>
+                <td>
+                  <input type=text name="relVersions"
+                         value="<ww:property value="release"/>" size="100">
+                </td>
+              </tr>
+              <tr>
+                <th>Next Development Version*</th>
+                <td>
+                  <input type=text name="devVersions"
+                         value="<ww:property value="dev"/>" size="100">
+                </td>
+              </tr>
+             </table>
            </div>
         </ww:iterator>
 

Modified: maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/webapp/releaseProject.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/webapp/releaseProject.jsp?view=diff&rev=442453&r1=442452&r2=442453
==============================================================================
--- maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/webapp/releaseProject.jsp
(original)
+++ maven/continuum/branches/release-integration/continuum/continuum-webapp/src/main/webapp/releaseProject.jsp
Mon Sep 11 22:15:38 2006
@@ -17,6 +17,11 @@
           <br/>
           &nbsp;&nbsp;&nbsp;
           <select name="preparedReleaseName">
+            <ww:iterator value="releaseList">
+              <option value="<ww:property/>">
+                <ww:property/>
+              </option>
+            </ww:iterator>
             <ww:if test="preparedReleaseName != null">
               <option selected value="<ww:property value="preparedReleaseName"/>">
                 <ww:property value="preparedReleaseName"/>



Mime
View raw message