continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r494499 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/release/ continuum-release/ continuum-release/src/main/java/org/apache/maven/continuum/release/ continuum-release/src/main/java/org/apache/maven/con...
Date Tue, 09 Jan 2007 17:34:50 GMT
Author: evenisse
Date: Tue Jan  9 09:34:47 2007
New Revision: 494499

URL: http://svn.apache.org/viewvc?view=rev&rev=494499
Log:
[CONTINUUM-1030] Fix working copy if the release fails
Submitted by: Edwin Punzalan

Added:
    maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/RollbackReleaseTaskExecutor.java   (with props)
    maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/ReleaseProjectTask.java   (with props)
    maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/RollbackReleaseProjectTask.java   (with props)
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java   (with props)
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseRollbackWarning.jsp   (with props)
Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/release/ContinuumReleaseManager.java
    maven/continuum/trunk/continuum-release/pom.xml
    maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
    maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/AbstractReleaseTaskExecutor.java
    maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java
    maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PrepareReleaseTaskExecutor.java
    maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/AbstractReleaseProjectTask.java
    maven/continuum/trunk/continuum-release/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseInProgressAction.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseFinished.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseInProgress.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseInitialized.jsp

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/release/ContinuumReleaseManager.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/release/ContinuumReleaseManager.java?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/release/ContinuumReleaseManager.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/release/ContinuumReleaseManager.java Tue Jan  9 09:34:47 2007
@@ -38,8 +38,12 @@
     /**
      * Prepare a project for release
      *
-     * @param project      project / project group to be released
+     * @param project
      * @param releaseProperties
+     * @param releaseVersions
+     * @param developmentVersions
+     * @param listener
+     * @return
      * @throws ContinuumReleaseException
      */
     String prepare( Project project, Properties releaseProperties, Map releaseVersions,
@@ -62,11 +66,27 @@
     /**
      * Perform a release based on a release descriptor received by the Maven Release Plugin.
      *
-     * @param descriptorFile
+     * @param releaseId
+     * @param workingDirectory
+     * @param buildDirectory
+     * @param goals
+     * @param useReleaseProfile
+     * @param listener
      * @throws ContinuumReleaseException
      */
-    void perform( String releaseId, File descriptorFile, File buildDirectory,
+    void perform( String releaseId, String workingDirectory, File buildDirectory,
                   String goals, boolean useReleaseProfile, ContinuumReleaseManagerListener listener )
+        throws ContinuumReleaseException;
+
+    /**
+     * Rollback changes made by a previous release.
+     *
+     * @param releaseId
+     * @param workingDirectory
+     * @param listener
+     * @throws ContinuumReleaseException
+     */
+    public void rollback( String releaseId, String workingDirectory, ContinuumReleaseManagerListener listener )
         throws ContinuumReleaseException;
 
     Map getPreparedReleases();

Modified: maven/continuum/trunk/continuum-release/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/pom.xml?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-release/pom.xml (original)
+++ maven/continuum/trunk/continuum-release/pom.xml Tue Jan  9 09:34:47 2007
@@ -45,7 +45,7 @@
       <artifactId>maven-model</artifactId>
     </dependency>
     <!--
-      adding maven-artifact as a dependency since maven-2.0.5-SNAPSHOT 
+      adding maven-artifact as a dependency since maven-2.0.5-SNAPSHOT
       appears to have a slightly different way of resolving dependencies
       and 2.0 artifact is getting chosen as opposed to 2.0.4 like earlier
       versions of maven peg it to...the 2.0 artifact was coming from the
@@ -60,7 +60,7 @@
       <artifactId>maven-artifact-manager</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.apache.maven.shared</groupId>
+      <groupId>org.apache.maven.release</groupId>
       <artifactId>maven-release-manager</artifactId>
       <version>1.0-SNAPSHOT</version>
     </dependency>

Modified: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java (original)
+++ maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java Tue Jan  9 09:34:47 2007
@@ -22,16 +22,16 @@
 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.continuum.release.tasks.RollbackReleaseProjectTask;
 import org.apache.maven.shared.release.ReleaseManagerListener;
 import org.apache.maven.shared.release.config.ReleaseDescriptor;
-import org.apache.maven.shared.release.config.io.xpp3.ReleaseDescriptorXpp3Reader;
+import org.apache.maven.shared.release.config.ReleaseDescriptorStore;
+import org.apache.maven.shared.release.config.ReleaseDescriptorStoreException;
+import org.codehaus.plexus.taskqueue.Task;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 import org.codehaus.plexus.taskqueue.TaskQueueException;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
 import java.util.Hashtable;
 import java.util.Map;
 import java.util.Properties;
@@ -46,6 +46,11 @@
     /**
      * @plexus.requirement
      */
+    private ReleaseDescriptorStore releaseStore;
+
+    /**
+     * @plexus.requirement
+     */
     private TaskQueue prepareReleaseQueue;
 
     /**
@@ -53,6 +58,11 @@
      */
     private TaskQueue performReleaseQueue;
 
+    /**
+     * @plexus.requirement
+     */
+    private TaskQueue rollbackReleaseQueue;
+
     private Map listeners;
 
     /**
@@ -102,23 +112,11 @@
         }
     }
 
-    public void perform( String releaseId, File descriptorFile, File buildDirectory,
+    public void perform( String releaseId, String workingDirectory, File buildDirectory,
                          String goals, boolean useReleaseProfile, ContinuumReleaseManagerListener listener )
         throws ContinuumReleaseException
     {
-        ReleaseDescriptor descriptor;
-        try
-        {
-            descriptor = new ReleaseDescriptorXpp3Reader().read( new FileReader( descriptorFile ) );
-        }
-        catch ( IOException e )
-        {
-            throw new ContinuumReleaseException( "Failed to parse descriptor file.", e );
-        }
-        catch ( XmlPullParserException e )
-        {
-            throw new ContinuumReleaseException( "Failed to parse descriptor file.", e );
-        }
+        ReleaseDescriptor descriptor = readReleaseDescriptor( workingDirectory );
 
         perform( releaseId, descriptor, buildDirectory, goals, useReleaseProfile, listener );
     }
@@ -141,6 +139,30 @@
         }
     }
 
+    public void rollback( String releaseId, String workingDirectory, ContinuumReleaseManagerListener listener )
+        throws ContinuumReleaseException
+    {
+        ReleaseDescriptor descriptor = readReleaseDescriptor( workingDirectory );
+
+        rollback( releaseId, descriptor, listener );
+    }
+
+    private void rollback( String releaseId, ReleaseDescriptor descriptor, ContinuumReleaseManagerListener listener )
+        throws ContinuumReleaseException
+    {
+        Task releaseTask =
+            new RollbackReleaseProjectTask( releaseId, descriptor, (ReleaseManagerListener) listener );
+
+        try
+        {
+            rollbackReleaseQueue.put( releaseTask );
+        }
+        catch ( TaskQueueException e )
+        {
+            throw new ContinuumReleaseException( "Failed to rollback release.", e );
+        }
+    }
+
     public Map getPreparedReleases()
     {
         if ( preparedReleases == null )
@@ -189,6 +211,24 @@
 
         //forced properties
         descriptor.setInteractive( false );
+
+        return descriptor;
+    }
+
+    private ReleaseDescriptor readReleaseDescriptor( String workingDirectory )
+        throws ContinuumReleaseException
+    {
+        ReleaseDescriptor descriptor = new ReleaseDescriptor();
+        descriptor.setWorkingDirectory( workingDirectory );
+
+        try
+        {
+            descriptor = releaseStore.read( descriptor );
+        }
+        catch ( ReleaseDescriptorStoreException e )
+        {
+            throw new ContinuumReleaseException( "Failed to parse descriptor file.", e );
+        }
 
         return descriptor;
     }

Modified: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/AbstractReleaseTaskExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/AbstractReleaseTaskExecutor.java?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/AbstractReleaseTaskExecutor.java (original)
+++ maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/AbstractReleaseTaskExecutor.java Tue Jan  9 09:34:47 2007
@@ -26,8 +26,7 @@
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.continuum.release.ContinuumReleaseException;
 import org.apache.maven.continuum.release.ContinuumReleaseManager;
-import org.apache.maven.shared.release.ReleaseManager;
-import org.apache.maven.shared.release.config.ReleaseDescriptor;
+import org.apache.maven.continuum.release.tasks.ReleaseProjectTask;
 import org.apache.maven.profiles.DefaultProfileManager;
 import org.apache.maven.profiles.ProfileManager;
 import org.apache.maven.project.DuplicateProjectException;
@@ -37,8 +36,13 @@
 import org.apache.maven.project.ProjectSorter;
 import org.apache.maven.settings.MavenSettingsBuilder;
 import org.apache.maven.settings.Settings;
+import org.apache.maven.shared.release.ReleaseManager;
+import org.apache.maven.shared.release.ReleaseResult;
+import org.apache.maven.shared.release.config.ReleaseDescriptor;
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.taskqueue.Task;
+import org.codehaus.plexus.taskqueue.execution.TaskExecutionException;
 import org.codehaus.plexus.context.Context;
 import org.codehaus.plexus.context.ContextException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
@@ -86,13 +90,70 @@
 
     private PlexusContainer container;
 
-    private Settings settings;
+    protected Settings settings;
+
+    public void executeTask( Task task )
+        throws TaskExecutionException
+    {
+        ReleaseProjectTask releaseTask = (ReleaseProjectTask) task;
+
+        setUp( releaseTask );
+
+        execute( releaseTask );
+    }
+
+    protected void setUp( ReleaseProjectTask releaseTask )
+        throws TaskExecutionException
+    {
+        try
+        {
+            //make sure settings is re-read each time
+            settings = getSettings();
+        }
+        catch ( ContinuumReleaseException e )
+        {
+            ReleaseResult result = new ReleaseResult();
+
+            result.appendError( e );
+
+            continuumReleaseManager.getReleaseResults().put( releaseTask.getReleaseId(), result );
+
+            releaseTask.getListener().error( e.getMessage() );
+
+            throw new TaskExecutionException( "Failed to build reactor projects.", e );
+        }
+    }
+
+    protected abstract void execute( ReleaseProjectTask releaseTask )
+        throws TaskExecutionException;
+
+    protected List getReactorProjects( ReleaseProjectTask releaseTask )
+        throws TaskExecutionException
+    {
+        List reactorProjects;
+        try
+        {
+            reactorProjects = getReactorProjects( releaseTask.getDescriptor() );
+        }
+        catch ( ContinuumReleaseException e )
+        {
+            ReleaseResult result = new ReleaseResult();
+
+            result.appendError( e );
+
+            continuumReleaseManager.getReleaseResults().put( releaseTask.getReleaseId(), result );
+
+            releaseTask.getListener().error( e.getMessage() );
+
+            throw new TaskExecutionException( "Failed to build reactor projects.", e );
+        }
+
+        return reactorProjects;
+    }
 
     protected List getReactorProjects( ReleaseDescriptor descriptor )
         throws ContinuumReleaseException
     {
-        Settings settings = getSettings();
-
         List reactorProjects = new ArrayList();
 
         MavenProject project;
@@ -151,23 +212,20 @@
         return reactorProjects;
     }
 
-    protected Settings getSettings()
+    private Settings getSettings()
         throws ContinuumReleaseException
     {
-        if ( settings == null )
+        try
         {
-            try
-            {
-                settings = settingsBuilder.buildSettings();
-            }
-            catch ( IOException e )
-            {
-                throw new ContinuumReleaseException( "Failed to get Maven Settings.", e );
-            }
-            catch ( XmlPullParserException e )
-            {
-                throw new ContinuumReleaseException( "Failed to get Maven Settings.", e );
-            }
+            settings = settingsBuilder.buildSettings();
+        }
+        catch ( IOException e )
+        {
+            throw new ContinuumReleaseException( "Failed to get Maven Settings.", e );
+        }
+        catch ( XmlPullParserException e )
+        {
+            throw new ContinuumReleaseException( "Failed to get Maven Settings.", e );
         }
 
         return settings;

Modified: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java (original)
+++ maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java Tue Jan  9 09:34:47 2007
@@ -19,13 +19,11 @@
  * under the License.
  */
 
-import org.apache.maven.continuum.release.ContinuumReleaseException;
 import org.apache.maven.continuum.release.tasks.PerformReleaseProjectTask;
+import org.apache.maven.continuum.release.tasks.ReleaseProjectTask;
 import org.apache.maven.shared.release.ReleaseManagerListener;
 import org.apache.maven.shared.release.ReleaseResult;
 import org.apache.maven.shared.release.config.ReleaseDescriptor;
-import org.apache.maven.settings.Settings;
-import org.codehaus.plexus.taskqueue.Task;
 import org.codehaus.plexus.taskqueue.execution.TaskExecutionException;
 
 import java.util.List;
@@ -36,7 +34,7 @@
 public class PerformReleaseTaskExecutor
     extends AbstractReleaseTaskExecutor
 {
-    public void executeTask( Task task )
+    public void execute( ReleaseProjectTask task )
         throws TaskExecutionException
     {
         PerformReleaseProjectTask performTask = (PerformReleaseProjectTask) task;
@@ -45,41 +43,7 @@
 
         ReleaseDescriptor descriptor = performTask.getDescriptor();
 
-        Settings settings;
-        try
-        {
-            settings = getSettings();
-        }
-        catch ( ContinuumReleaseException e )
-        {
-            ReleaseResult result = new ReleaseResult();
-
-            result.appendError( e );
-
-            continuumReleaseManager.getReleaseResults().put( performTask.getReleaseId(), result );
-
-            listener.error( e.getMessage() );
-
-            throw new TaskExecutionException( "Failed to build reactor projects.", e );
-        }
-
-        List reactorProjects;
-        try
-        {
-            reactorProjects = getReactorProjects( descriptor );
-        }
-        catch ( ContinuumReleaseException e )
-        {
-            ReleaseResult result = new ReleaseResult();
-
-            result.appendError( e );
-
-            continuumReleaseManager.getReleaseResults().put( performTask.getReleaseId(), result );
-
-            listener.error( e.getMessage() );
-
-            throw new TaskExecutionException( "Failed to build reactor projects.", e );
-        }
+        List reactorProjects = getReactorProjects( performTask );
 
         ReleaseResult result =
             releasePluginManager.performWithResult( descriptor, settings, reactorProjects,

Modified: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PrepareReleaseTaskExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PrepareReleaseTaskExecutor.java?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PrepareReleaseTaskExecutor.java (original)
+++ maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PrepareReleaseTaskExecutor.java Tue Jan  9 09:34:47 2007
@@ -19,13 +19,10 @@
  * under the License.
  */
 
-import org.apache.maven.continuum.release.ContinuumReleaseException;
 import org.apache.maven.continuum.release.tasks.PrepareReleaseProjectTask;
-import org.apache.maven.shared.release.ReleaseManagerListener;
+import org.apache.maven.continuum.release.tasks.ReleaseProjectTask;
 import org.apache.maven.shared.release.ReleaseResult;
 import org.apache.maven.shared.release.config.ReleaseDescriptor;
-import org.apache.maven.settings.Settings;
-import org.codehaus.plexus.taskqueue.Task;
 import org.codehaus.plexus.taskqueue.execution.TaskExecutionException;
 
 import java.util.List;
@@ -36,53 +33,17 @@
 public class PrepareReleaseTaskExecutor
     extends AbstractReleaseTaskExecutor
 {
-    public void executeTask( Task task )
+    protected void execute( ReleaseProjectTask task )
         throws TaskExecutionException
     {
         PrepareReleaseProjectTask prepareTask = (PrepareReleaseProjectTask) task;
 
-        ReleaseManagerListener listener = prepareTask.getListener();
-
-        Settings settings;
-        try
-        {
-            settings = getSettings();
-        }
-        catch ( ContinuumReleaseException e )
-        {
-            ReleaseResult result = new ReleaseResult();
-
-            result.appendError( e );
-
-            continuumReleaseManager.getReleaseResults().put( prepareTask.getReleaseId(), result );
-
-            listener.error( e.getMessage() );
-
-            throw new TaskExecutionException( "Failed to build reactor projects.", e );
-        }
-
         ReleaseDescriptor descriptor = prepareTask.getDescriptor();
 
-        List reactorProjects;
-        try
-        {
-            reactorProjects = getReactorProjects( descriptor );
-        }
-        catch ( ContinuumReleaseException e )
-        {
-            ReleaseResult result = new ReleaseResult();
-
-            result.appendError( e );
-
-            continuumReleaseManager.getReleaseResults().put( prepareTask.getReleaseId(), result );
-
-            listener.error( e.getMessage() );
-
-            throw new TaskExecutionException( "Failed to build reactor projects.", e );
-        }
+        List reactorProjects = getReactorProjects( prepareTask );
 
         ReleaseResult result = releasePluginManager.prepareWithResult( descriptor, settings, reactorProjects,
-                                                                       false, false, listener );
+                                                                       false, false, prepareTask.getListener() );
 
         if ( result.getResultCode() == ReleaseResult.SUCCESS )
         {

Added: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/RollbackReleaseTaskExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/RollbackReleaseTaskExecutor.java?view=auto&rev=494499
==============================================================================
--- maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/RollbackReleaseTaskExecutor.java (added)
+++ maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/RollbackReleaseTaskExecutor.java Tue Jan  9 09:34:47 2007
@@ -0,0 +1,54 @@
+package org.apache.maven.continuum.release.executors;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.continuum.release.tasks.ReleaseProjectTask;
+import org.apache.maven.shared.release.ReleaseExecutionException;
+import org.apache.maven.shared.release.ReleaseFailureException;
+import org.codehaus.plexus.taskqueue.execution.TaskExecutionException;
+
+import java.util.List;
+
+/**
+ * @author Edwin Punzalan
+ */
+public class RollbackReleaseTaskExecutor
+    extends AbstractReleaseTaskExecutor
+{
+    protected void execute( ReleaseProjectTask releaseTask )
+        throws TaskExecutionException
+    {
+        List reactorProjects = getReactorProjects( releaseTask );
+
+        try
+        {
+            releasePluginManager.rollback( releaseTask.getDescriptor(), settings, reactorProjects,
+                                           releaseTask.getListener() );
+        }
+        catch ( ReleaseExecutionException e )
+        {
+            throw new TaskExecutionException( "Failed to rollback release", e );
+        }
+        catch ( ReleaseFailureException e )
+        {
+            throw new TaskExecutionException( "Failed to rollback release", e );
+        }
+    }
+}

Propchange: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/RollbackReleaseTaskExecutor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/RollbackReleaseTaskExecutor.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/AbstractReleaseProjectTask.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/AbstractReleaseProjectTask.java?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/AbstractReleaseProjectTask.java (original)
+++ maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/AbstractReleaseProjectTask.java Tue Jan  9 09:34:47 2007
@@ -27,7 +27,7 @@
  * @author Edwin Punzalan
  */
 public abstract class AbstractReleaseProjectTask
-    implements Task
+    implements Task, ReleaseProjectTask
 {
     private String releaseId;
 

Added: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/ReleaseProjectTask.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/ReleaseProjectTask.java?view=auto&rev=494499
==============================================================================
--- maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/ReleaseProjectTask.java (added)
+++ maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/ReleaseProjectTask.java Tue Jan  9 09:34:47 2007
@@ -0,0 +1,41 @@
+package org.apache.maven.continuum.release.tasks;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.shared.release.config.ReleaseDescriptor;
+import org.apache.maven.shared.release.ReleaseManagerListener;
+
+/**
+ * @author Edwin Punzalan
+ */
+public interface ReleaseProjectTask
+{
+    public void setDescriptor( ReleaseDescriptor descriptor );
+
+    public ReleaseDescriptor getDescriptor();
+
+    public void setReleaseId( String releaseId );
+
+    public String getReleaseId();
+
+    public void setListener( ReleaseManagerListener listener );
+
+    public ReleaseManagerListener getListener();
+}

Propchange: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/ReleaseProjectTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/ReleaseProjectTask.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/RollbackReleaseProjectTask.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/RollbackReleaseProjectTask.java?view=auto&rev=494499
==============================================================================
--- maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/RollbackReleaseProjectTask.java (added)
+++ maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/RollbackReleaseProjectTask.java Tue Jan  9 09:34:47 2007
@@ -0,0 +1,36 @@
+package org.apache.maven.continuum.release.tasks;
+
+import org.apache.maven.shared.release.config.ReleaseDescriptor;
+import org.apache.maven.shared.release.ReleaseManagerListener;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @author Edwin Punzalan
+ */
+public class RollbackReleaseProjectTask
+    extends AbstractReleaseProjectTask
+{
+    public RollbackReleaseProjectTask( String releaseId, ReleaseDescriptor descriptor,
+                                      ReleaseManagerListener listener )
+    {
+        super( releaseId, descriptor, listener );
+    }
+}

Propchange: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/RollbackReleaseProjectTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/RollbackReleaseProjectTask.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-release/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/main/resources/META-INF/plexus/components.xml?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-release/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/continuum/trunk/continuum-release/src/main/resources/META-INF/plexus/components.xml Tue Jan  9 09:34:47 2007
@@ -25,6 +25,10 @@
       <implementation>org.apache.maven.continuum.release.DefaultContinuumReleaseManager</implementation>
       <requirements>
         <requirement>
+          <role>org.apache.maven.shared.release.config.ReleaseDescriptorStore</role>
+          <role-hint>properties</role-hint>
+        </requirement>
+        <requirement>
           <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
           <role-hint>prepare-release</role-hint>
           <field-name>prepareReleaseQueue</field-name>
@@ -34,6 +38,11 @@
           <role-hint>perform-release</role-hint>
           <field-name>performReleaseQueue</field-name>
         </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
+          <role-hint>rollback-release</role-hint>
+          <field-name>rollbackReleaseQueue</field-name>
+        </requirement>
       </requirements>
     </component>
 
@@ -160,6 +169,69 @@
       </requirements>
       <configuration>
         <name>perform-release</name>
+      </configuration>
+    </component>
+
+    <!--
+     |
+     | Rollback Release Project Task Queue
+     |
+     |-->
+
+    <component>
+      <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
+      <role-hint>rollback-release</role-hint>
+      <implementation>org.codehaus.plexus.taskqueue.DefaultTaskQueue</implementation>
+      <lifecycle-handler>plexus-configurable</lifecycle-handler>
+      <configuration>
+        <task-entry-evaluators>
+        </task-entry-evaluators>
+        <task-exit-evaluators>
+        </task-exit-evaluators>
+        <task-viability-evaluators>
+        </task-viability-evaluators>
+      </configuration>
+    </component>
+
+    <component>
+      <role>org.codehaus.plexus.taskqueue.execution.TaskExecutor</role>
+      <role-hint>rollback-release</role-hint>
+      <implementation>org.apache.maven.continuum.release.executors.RollbackReleaseTaskExecutor</implementation>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.continuum.release.ContinuumReleaseManager</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.shared.release.ReleaseManager</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.project.MavenProjectBuilder</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.settings.MavenSettingsBuilder</role>
+        </requirement>
+      </requirements>
+      <configuration>
+        <local-repository>${plexus.home}/local-repository</local-repository>
+      </configuration>
+    </component>
+
+    <component>
+      <role>org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor</role>
+      <role-hint>rollback-release</role-hint>
+      <implementation>org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.taskqueue.execution.TaskExecutor</role>
+          <role-hint>rollback-release</role-hint>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
+          <role-hint>rollback-release</role-hint>
+        </requirement>
+      </requirements>
+      <configuration>
+        <name>rollback-release</name>
       </configuration>
     </component>
 

Modified: maven/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java (original)
+++ maven/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java Tue Jan  9 09:34:47 2007
@@ -21,6 +21,7 @@
 
 import org.apache.maven.continuum.release.tasks.PrepareReleaseProjectTask;
 import org.apache.maven.continuum.release.tasks.PerformReleaseProjectTask;
+import org.apache.maven.continuum.release.tasks.RollbackReleaseProjectTask;
 import org.apache.maven.continuum.release.ContinuumReleaseManager;
 import org.apache.maven.shared.release.config.ReleaseDescriptor;
 import org.apache.maven.shared.release.ReleaseResult;
@@ -49,6 +50,8 @@
 
     private TaskExecutor performExec;
 
+    private TaskExecutor rollbackExec;
+
     private ContinuumReleaseManager releaseManager;
 
     protected void setUp()
@@ -71,6 +74,11 @@
             performExec = (TaskExecutor) lookup( TaskExecutor.class.getName(), "perform-release" );
         }
 
+        if ( rollbackExec == null )
+        {
+            rollbackExec = (TaskExecutor) lookup( TaskExecutor.class.getName(), "rollback-release" );
+        }
+
         if ( releaseManager == null )
         {
             releaseManager = (ContinuumReleaseManager) lookup( ContinuumReleaseManager.ROLE );
@@ -83,7 +91,7 @@
     public void releaseSimpleProject()
         throws Exception
     {
-    	String scmPath = new File( getBasedir(), "target/scm-test" ).getAbsolutePath().replace( '\\', '/' );
+        String scmPath = new File( getBasedir(), "target/scm-test" ).getAbsolutePath().replace( '\\', '/' );
         File workDir = new File( getBasedir(), "target/test-classes/work-dir" );
         FileUtils.deleteDirectory( workDir );
         File testDir = new File( getBasedir(), "target/test-classes/test-dir" );
@@ -113,12 +121,15 @@
         pom = FileUtils.fileRead( new File( testDir, "pom.xml" ) );
         assertTrue( "Test released version", pom.indexOf( "<version>1.0</version>" ) > 0 );
     }
-    
-    public void testReleases() throws Exception{
-    	releaseSimpleProject();
-    	releaseSimpleProjectWithNextVersion();
+
+    public void testReleases()
+        throws Exception
+    {
+        releaseSimpleProject();
+        releaseAndRollbackProject();
+        releaseSimpleProjectWithNextVersion();
     }
-    
+
     public void releaseSimpleProjectWithNextVersion()
         throws Exception
     {
@@ -161,6 +172,50 @@
         {
             fail( "Error in release:perform. Release output follows:\n" + result.getOutput() );
         }
+    }
+
+    public void releaseAndRollbackProject()
+        throws Exception
+    {
+        String scmPath = new File( getBasedir(), "target/scm-test" ).getAbsolutePath().replace( '\\', '/' );
+        File workDir = new File( getBasedir(), "target/test-classes/work-dir" );
+        FileUtils.deleteDirectory( workDir );
+        File testDir = new File( getBasedir(), "target/test-classes/test-dir" );
+        FileUtils.deleteDirectory( testDir );
+
+        ReleaseDescriptor descriptor = new ReleaseDescriptor();
+        descriptor.setInteractive( false );
+        descriptor.setScmSourceUrl( "scm:svn:file://localhost/" + scmPath + "/trunk" );
+        descriptor.setWorkingDirectory( workDir.getAbsolutePath() );
+
+        ScmRepository repository = getScmRepositorty( descriptor.getScmSourceUrl() );
+        ScmFileSet fileSet = new ScmFileSet( workDir );
+        scmManager.getProviderByRepository( repository ).checkOut( repository, fileSet, null );
+
+        String pom = FileUtils.fileRead( new File( workDir, "pom.xml" ) );
+        assertTrue( "Test dev version", pom.indexOf( "<version>1.1-SNAPSHOT</version>" ) > 0 );
+
+        doPrepareWithNoError( descriptor );
+
+        pom = FileUtils.fileRead( new File( workDir, "pom.xml" ) );
+        assertTrue( "Test version increment", pom.indexOf( "<version>1.2-SNAPSHOT</version>" ) > 0 );
+
+        repository = getScmRepositorty( "scm:svn:file://localhost/" + scmPath + "/tags/test-artifact-1.1" );
+        fileSet = new ScmFileSet( testDir );
+        scmManager.getProviderByRepository( repository ).checkOut( repository, fileSet, null );
+
+        pom = FileUtils.fileRead( new File( testDir, "pom.xml" ) );
+        assertTrue( "Test released version", pom.indexOf( "<version>1.1</version>" ) > 0 );
+
+        rollbackExec.executeTask( new RollbackReleaseProjectTask( "testRelease", descriptor, null ) );
+
+        pom = FileUtils.fileRead( new File( workDir, "pom.xml" ) );
+        assertTrue( "Test rollback version", pom.indexOf( "<version>1.1-SNAPSHOT</version>" ) > 0 );
+
+        assertFalse( "Test that release.properties has been cleaned", new File( workDir, "release.properties" ).exists() );
+        assertFalse( "Test that backup file has been cleaned", new File( workDir, "pom.xml.releaseBackup" ).exists() );
+
+        //@todo when implemented already, check if tag was also removed
     }
 
     private void doPrepareWithNoError( ReleaseDescriptor descriptor )

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseInProgressAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseInProgressAction.java?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseInProgressAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseInProgressAction.java Tue Jan  9 09:34:47 2007
@@ -37,6 +37,8 @@
 
     private String releaseId;
 
+    private String releaseGoal;
+
     private ContinuumReleaseManagerListener listener;
 
     private ReleaseResult result;
@@ -137,5 +139,15 @@
     public void setProjectId( int projectId )
     {
         this.projectId = projectId;
+    }
+
+    public String getReleaseGoal()
+    {
+        return releaseGoal;
+    }
+
+    public void setReleaseGoal( String releaseGoal )
+    {
+        this.releaseGoal = releaseGoal;
     }
 }

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java?view=auto&rev=494499
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java Tue Jan  9 09:34:47 2007
@@ -0,0 +1,95 @@
+package org.apache.maven.continuum.web.action;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.continuum.release.ContinuumReleaseManager;
+import org.apache.maven.continuum.release.ContinuumReleaseManagerListener;
+import org.apache.maven.continuum.release.DefaultReleaseManagerListener;
+import org.apache.maven.continuum.model.project.Project;
+
+/**
+ * @author Edwin Punzalan
+ *
+ * @plexus.component
+ *   role="com.opensymphony.xwork.Action"
+ *   role-hint="releaseRollback"
+ */
+public class ReleaseRollbackAction
+    extends ContinuumActionSupport
+{
+    private int projectId;
+
+    private String releaseId;
+
+    public String execute()
+        throws Exception
+    {
+        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
+
+        ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();
+
+        Project project = getContinuum().getProject( projectId );
+
+        releaseManager.rollback( releaseId, project.getWorkingDirectory(), listener );
+
+        //recurse until rollback is finished
+        while( listener.getState() != ContinuumReleaseManagerListener.FINISHED )
+        {
+            try
+            {
+                Thread.sleep( 1000 );
+            }
+            catch( InterruptedException e )
+            {
+                //do nothing
+            }
+        }
+
+        releaseManager.getPreparedReleases().remove( releaseId );
+
+        return SUCCESS;
+    }
+
+    public String warn()
+        throws Exception
+    {
+        return SUCCESS;
+    }
+
+    public int getProjectId()
+    {
+        return projectId;
+    }
+
+    public void setProjectId( int projectId )
+    {
+        this.projectId = projectId;
+    }
+
+    public String getReleaseId()
+    {
+        return releaseId;
+    }
+
+    public void setReleaseId( String releaseId )
+    {
+        this.releaseId = releaseId;
+    }
+}

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml Tue Jan  9 09:34:47 2007
@@ -41,6 +41,10 @@
       <role>org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor</role>
       <role-hint>perform-release</role-hint>
     </component>
+    <component>
+      <role>org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor</role>
+      <role-hint>rollback-release</role-hint>
+    </component>
   </load-on-start>
 
   <components>

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Tue Jan  9 09:34:47 2007
@@ -51,7 +51,7 @@
           <param name="excludeMethods">input,back,cancel,browse,edit</param>
         </interceptor-ref>
       </interceptor-stack>
-      
+
       <interceptor-stack name="unconfiguredContinuumStack">
         <interceptor-ref name="defaultStack"/>
         <interceptor-ref name="exception-logging"/>
@@ -395,6 +395,18 @@
       <result name="success">/WEB-INF/jsp/releaseFinished.jsp</result>
     </action>
 
+    <action name="releaseRollbackWarning" class="releaseRollback" method="warn">
+      <result>/WEB-INF/jsp/releaseRollbackWarning.jsp</result>
+    </action>
+
+    <action name="releaseRollback" class="releaseRollback">
+      <result name="success" type="redirect-action">
+        <param name="actionName">releaseCleanup</param>
+        <param name="projectId">${projectId}</param>
+        <param name="releaseId">${releaseId}</param>
+      </result>
+    </action>
+
     <action name="releaseCleanup" class="releaseCleanup">
       <result name="prepareFinished" type="chain">releasePromptGoal</result>
       <result name="performFinished" type="chain">groupSummary</result>
@@ -486,7 +498,7 @@
     </action>
 
   </package>
-  
+
   <package name="notifier" extends="default">
     <!--
     * notifier actions :: Project

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseFinished.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseFinished.jsp?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseFinished.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseFinished.jsp Tue Jan  9 09:34:47 2007
@@ -26,52 +26,65 @@
     <body>
       <h2><ww:text name="releaseInProgress.section.title"/></h2>
       <h3><ww:property value="name"/></h3>
-      <ww:form action="releaseCleanup" method="post">
-        <ww:hidden name="projectId"/>
-        <ww:hidden name="releaseId"/>
-        <div class="axial">
-          <table width="100%">
+      <div class="axial">
+        <table width="100%">
+          <tr>
+            <th><ww:text name="releaseInProgress.status"/></th>
+            <th width="100%"><ww:text name="releaseInProgress.phase"/></th>
+          </tr>
+          <ww:iterator value="listener.phases">
             <tr>
-              <th><ww:text name="releaseInProgress.status"/></th>
-              <th width="100%"><ww:text name="releaseInProgress.phase"/></th>
-            </tr>
-            <ww:iterator value="listener.phases">
-              <tr>
-                <td>
-                <ww:if test="listener.completedPhases.contains( top )">
-                  <img src="<ww:url value='/images/icon_success_sml.gif'/>"
-                       alt="Done" title="Done" border="0">
+              <td>
+              <ww:if test="listener.completedPhases.contains( top )">
+                <img src="<ww:url value='/images/icon_success_sml.gif'/>"
+                     alt="Done" title="Done" border="0">
+              </ww:if>
+              <ww:elseif test="listener.inProgress.equals( top )">
+                <ww:if test="listener.error == null">
+                  <img src="<ww:url value='/images/building.gif'/>"
+                       alt="In Progress" title="In Progress" border="0">
                 </ww:if>
-                <ww:elseif test="listener.inProgress.equals( top )">
-                  <ww:if test="listener.error == null">
-                    <img src="<ww:url value='/images/building.gif'/>"
-                         alt="In Progress" title="In Progress" border="0">
-                  </ww:if>
-                  <ww:else>
-                    <img src="<ww:url value='/images/icon_error_sml.gif'/>"
-                         alt="Error" title="Error" border="0">
-                  </ww:else>
-                </ww:elseif>
                 <ww:else>
-                  <img src="<ww:url value='/images/inqueue.gif'/>"
-                       alt="Queued" title="Queued" border="0">
+                  <img src="<ww:url value='/images/icon_error_sml.gif'/>"
+                       alt="Error" title="Error" border="0">
                 </ww:else>
-                </td>
-                <td><ww:property/></td>
-              </tr>
-            </ww:iterator>
-          </table>
-        </div>
+              </ww:elseif>
+              <ww:else>
+                <img src="<ww:url value='/images/inqueue.gif'/>"
+                     alt="Queued" title="Queued" border="0">
+              </ww:else>
+              </td>
+              <td><ww:property/></td>
+            </tr>
+          </ww:iterator>
+        </table>
+      </div>
 
-        <p>
-          <ww:url id="releaseViewResultUrl" action="releaseViewResult" namespace="/">
-            <ww:param name="releaseId" value="releaseId"/>
-          </ww:url>
-          <ww:a href="%{releaseViewResultUrl}"><ww:text name="releaseInProgress.viewOutput"/></ww:a>
-        </p>
+      <p>
+        <ww:url id="releaseViewResultUrl" action="releaseViewResult" namespace="/">
+          <ww:param name="releaseId" value="releaseId"/>
+        </ww:url>
+        <ww:a href="%{releaseViewResultUrl}"><ww:text name="releaseInProgress.viewOutput"/></ww:a>
+      </p>
 
-        <ww:submit value="Done"/>
-      </ww:form>
+      <table>
+        <tr>
+          <td>
+            <ww:form action="releaseRollbackWarning" method="post">
+              <ww:hidden name="projectId"/>
+              <ww:hidden name="releaseId"/>
+              <ww:submit value="Rollback Changes"/>
+            </ww:form>
+          </td>
+          <td>
+            <ww:form action="releaseCleanup" method="post">
+              <ww:hidden name="projectId"/>
+              <ww:hidden name="releaseId"/>
+              <ww:submit value="Done"/>
+            </ww:form>
+          </td>
+        </tr>
+      </table>
     </body>
   </ww:i18n>
 </html>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseInProgress.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseInProgress.jsp?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseInProgress.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseInProgress.jsp Tue Jan  9 09:34:47 2007
@@ -27,42 +27,43 @@
     <body>
       <h2><ww:text name="releaseInProgress.section.title"/></h2>
       <h3><ww:property value="name"/></h3>
-      <ww:form action="releaseInProgress" method="get">
-        <ww:hidden name="projectId"/>
-        <ww:hidden name="releaseId"/>
-        <div class="axial">
-          <table width="100%">
+      <div class="axial">
+        <table width="100%">
+          <tr>
+            <th><ww:text name="releaseInProgress.status"/></th>
+            <th width="100%"><ww:text name="releaseInProgress.phase"/></th>
+          </tr>
+          <ww:iterator value="listener.phases">
             <tr>
-              <th><ww:text name="releaseInProgress.status"/></th>
-              <th width="100%"><ww:text name="releaseInProgress.phase"/></th>
-            </tr>
-            <ww:iterator value="listener.phases">
-              <tr>
-                <td>
-                <ww:if test="listener.completedPhases.contains( top )">
-                  <img src="<ww:url value='/images/icon_success_sml.gif'/>"
-                       alt="Done" title="Done" border="0">
+              <td>
+              <ww:if test="listener.completedPhases.contains( top )">
+                <img src="<ww:url value='/images/icon_success_sml.gif'/>"
+                     alt="Done" title="Done" border="0">
+              </ww:if>
+              <ww:elseif test="listener.inProgress.equals( top )">
+                <ww:if test="listener.error == null">
+                  <img src="<ww:url value='/images/building.gif'/>"
+                       alt="In Progress" title="In Progress" border="0">
                 </ww:if>
-                <ww:elseif test="listener.inProgress.equals( top )">
-                  <ww:if test="listener.error == null">
-                    <img src="<ww:url value='/images/building.gif'/>"
-                         alt="In Progress" title="In Progress" border="0">
-                  </ww:if>
-                  <ww:else>
-                    <img src="<ww:url value='/images/icon_error_sml.gif'/>"
-                         alt="Error" title="Error" border="0">
-                  </ww:else>
-                </ww:elseif>
                 <ww:else>
-                  <img src="<ww:url value='/images/inqueue.gif'/>"
-                       alt="Queued" title="Queued" border="0">
+                  <img src="<ww:url value='/images/icon_error_sml.gif'/>"
+                       alt="Error" title="Error" border="0">
                 </ww:else>
-                </td>
-                <td><ww:property/></td>
-              </tr>
-            </ww:iterator>
-          </table>
-        </div>
+              </ww:elseif>
+              <ww:else>
+                <img src="<ww:url value='/images/inqueue.gif'/>"
+                     alt="Queued" title="Queued" border="0">
+              </ww:else>
+              </td>
+              <td><ww:property/></td>
+            </tr>
+          </ww:iterator>
+        </table>
+      </div>
+
+      <ww:form action="releaseInProgress" method="get">
+        <ww:hidden name="projectId"/>
+        <ww:hidden name="releaseId"/>
         <ww:submit value="Refresh"/>
       </ww:form>
     </body>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseInitialized.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseInitialized.jsp?view=diff&rev=494499&r1=494498&r2=494499
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseInitialized.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseInitialized.jsp Tue Jan  9 09:34:47 2007
@@ -27,15 +27,15 @@
     <body>
       <h2><ww:text name="releaseInProgress.section.title"/></h2>
       <h3><ww:property value="name"/></h3>
+      <p>
+        The release goal is currently initializing...
+      </p>
+      <p>
+        Please wait while the server prepares your project for release.
+      </p>
       <ww:form action="releaseInProgress" method="get">
         <ww:hidden name="projectId"/>
         <ww:hidden name="releaseId"/>
-          <p>
-            The release goal is currently initializing...
-          </p>
-          <p>
-            Please wait while the server prepares your project for release.
-          </p>
         <ww:submit value="Refresh"/>
       </ww:form>
     </body>

Added: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseRollbackWarning.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseRollbackWarning.jsp?view=auto&rev=494499
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseRollbackWarning.jsp (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseRollbackWarning.jsp Tue Jan  9 09:34:47 2007
@@ -0,0 +1,53 @@
+<%--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  --%>
+
+<%@ taglib uri="/webwork" prefix="ww" %>
+<html>
+  <ww:i18n name="localization.Continuum">
+    <head>
+        <title><ww:text name="releaseProject.page.title"/></title>
+    </head>
+    <body>
+      <h3>
+        <ww:text name="releaseProject.section.title">
+          <ww:param><ww:property value="projectName"/></ww:param>
+        </ww:text>
+      </h3>
+      <p>This will revert all changes made by the previous release?</p>
+      <table>
+        <tr>
+          <td>
+            <ww:form action="releaseRollback" method="post">
+              <ww:hidden name="projectId"/>
+              <ww:hidden name="releaseId"/>
+              <ww:submit value="Rollback Changes"/>
+            </ww:form>
+          </td>
+          <td>
+            <ww:form action="releaseInProgress" method="post">
+              <ww:hidden name="projectId"/>
+              <ww:hidden name="releaseId"/>
+              <ww:submit value="Cancel"/>
+            </ww:form>
+          </td>
+        </tr>
+      </table>
+    </body>
+  </ww:i18n>
+</html>

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseRollbackWarning.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/releaseRollbackWarning.jsp
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



Mime
View raw message