PR: CONTINUUM-904

reformatted release workflow and added form validations

git-svn-id: https://svn.apache.org/repos/asf/maven/continuum/branches/release-integration@448831 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseCleanupAction.java b/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseCleanupAction.java
new file mode 100644
index 0000000..76f0d7a
--- /dev/null
+++ b/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseCleanupAction.java
@@ -0,0 +1,78 @@
+package org.apache.maven.continuum.web.action;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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;
+
+/**
+ * @author Edwin Punzalan
+ *
+ * @plexus.component
+ *   role="com.opensymphony.xwork.Action"
+ *   role-hint="releaseCleanup"
+ */
+public class ReleaseCleanupAction
+    extends ContinuumActionSupport
+{
+    private int projectId;
+
+    private String releaseId;
+
+    public String execute()
+        throws Exception
+    {
+        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
+
+        releaseManager.getReleaseResults().remove( releaseId );
+
+        ContinuumReleaseManagerListener listener;
+
+        listener = (ContinuumReleaseManagerListener) releaseManager.getListeners().remove( releaseId );
+
+        if ( listener != null )
+        {
+            String goal = listener.getGoalName();
+
+            return goal + "Finished";
+        }
+        else
+        {
+            throw new Exception( "No listener to cleanup for id " + releaseId );
+        }
+    }
+
+    public String getReleaseId()
+    {
+        return releaseId;
+    }
+
+    public void setReleaseId( String releaseId )
+    {
+        this.releaseId = releaseId;
+    }
+
+    public int getProjectId()
+    {
+        return projectId;
+    }
+
+    public void setProjectId( int projectId )
+    {
+        this.projectId = projectId;
+    }
+}
diff --git a/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseInProgressAction.java b/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseInProgressAction.java
new file mode 100644
index 0000000..8fa6b69
--- /dev/null
+++ b/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseInProgressAction.java
@@ -0,0 +1,138 @@
+package org.apache.maven.continuum.web.action;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.plugins.release.ReleaseResult;
+
+/**
+ * @author Edwin Punzalan
+ *
+ * @plexus.component
+ *   role="com.opensymphony.xwork.Action"
+ *   role-hint="releaseInProgress"
+ */
+public class ReleaseInProgressAction
+    extends ContinuumActionSupport
+{
+    private int projectId;
+
+    private String releaseId;
+
+    private ContinuumReleaseManagerListener listener;
+
+    private ReleaseResult result;
+
+    public String execute()
+        throws Exception
+    {
+        String status;
+
+        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
+
+        listener = (ContinuumReleaseManagerListener) releaseManager.getListeners().get( releaseId );
+
+        if ( listener != null )
+        {
+            if ( listener.getState() == ContinuumReleaseManagerListener.LISTENING )
+            {
+                status = "inProgress";
+            }
+            else if ( listener.getState() == ContinuumReleaseManagerListener.FINISHED )
+            {
+                status = SUCCESS;
+            }
+            else
+            {
+                status = "initialized";
+            }
+        }
+        else
+        {
+            throw new Exception( "There is no on-going or finished release operation with id " + releaseId );
+        }
+
+        return status;
+    }
+
+    public String viewResult()
+        throws Exception
+    {
+        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
+
+        listener = (ContinuumReleaseManagerListener) releaseManager.getListeners().get( releaseId );
+
+        if ( listener != null )
+        {
+            if ( listener.getState() == ContinuumReleaseManagerListener.FINISHED )
+            {
+                result = (ReleaseResult) releaseManager.getReleaseResults().get( releaseId );
+
+                return SUCCESS;
+            }
+            else
+            {
+                throw new Exception( "The release operation with id " + releaseId + "has not finished yet.");
+            }
+        }
+        else
+        {
+            throw new Exception( "There is no finished release operation with id " + releaseId );
+        }
+    }
+
+    public String getReleaseId()
+    {
+        return releaseId;
+    }
+
+    public void setReleaseId( String releaseId )
+    {
+        this.releaseId = releaseId;
+    }
+
+    public ContinuumReleaseManagerListener getListener()
+    {
+        return listener;
+    }
+
+    public void setListener( ContinuumReleaseManagerListener listener )
+    {
+        this.listener = listener;
+    }
+
+    public ReleaseResult getResult()
+    {
+        return result;
+    }
+
+    public void setResult( ReleaseResult result )
+    {
+        this.result = result;
+    }
+
+    public int getProjectId()
+    {
+        return projectId;
+    }
+
+    public void setProjectId( int projectId )
+    {
+        this.projectId = projectId;
+    }
+}
diff --git a/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PerformReleaseAction.java b/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java
similarity index 75%
rename from continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PerformReleaseAction.java
rename to continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java
index 2f65b01..1371406 100644
--- a/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PerformReleaseAction.java
+++ b/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java
@@ -16,25 +16,23 @@
  * limitations under the License.
  */
 
+import org.apache.maven.continuum.model.project.Project;
 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;
-import org.apache.maven.plugins.release.config.ReleaseDescriptor;
 import org.apache.maven.plugins.release.ReleaseResult;
-import org.codehaus.plexus.util.StringUtils;
+import org.apache.maven.plugins.release.config.ReleaseDescriptor;
 
 import java.io.File;
-import java.util.Map;
 
 /**
  * @author Edwin Punzalan
  *
  * @plexus.component
  *   role="com.opensymphony.xwork.Action"
- *   role-hint="performRelease"
+ *   role-hint="releasePerform"
  */
-public class PerformReleaseAction
+public class ReleasePerformAction
     extends ContinuumActionSupport
 {
     private int projectId;
@@ -59,37 +57,23 @@
 
     private ReleaseResult result;
 
-    public String execute()
+    public String inputFromScm()
         throws Exception
     {
-        if ( StringUtils.isNotEmpty( releaseId )  )
-        {
-            ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
+        populateFromProject();
 
-            Map preparedReleases = releaseManager.getPreparedReleases();
-            if ( preparedReleases.containsKey( releaseId ) )
-            {
-                ReleaseDescriptor descriptor = (ReleaseDescriptor) preparedReleases.get( releaseId );
-                scmUrl = descriptor.getScmSourceUrl();
-                scmUsername = descriptor.getScmUsername();
-                scmPassword = descriptor.getScmPassword();
-                scmTag = descriptor.getScmReleaseLabel();
-                scmTagBase = descriptor.getScmTagBase();
-            }
-            else
-            {
-                populateFromProject();
-            }
-        }
-        else
-        {
-            populateFromProject();
-        }
+        releaseId = "";
 
-        return "prompt";
+        return SUCCESS;
     }
 
-    public String doPerform()
+    public String input()
+        throws Exception
+    {
+        return SUCCESS;
+    }
+
+    public String execute()
         throws Exception
     {
         listener = new DefaultReleaseManagerListener();
@@ -101,26 +85,31 @@
                                           "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";
+        return SUCCESS;
+    }
+
+    public String executeFromScm()
+        throws Exception
+    {
+        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
+
+        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 );
+
+        return execute();
     }
 
     public String checkProgress()
diff --git a/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PrepareReleaseAction.java b/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
similarity index 98%
rename from continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PrepareReleaseAction.java
rename to continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
index 423d5d6..3dbcc7a 100644
--- a/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PrepareReleaseAction.java
+++ b/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
@@ -43,9 +43,9 @@
  *
  * @plexus.component
  *   role="com.opensymphony.xwork.Action"
- *   role-hint="prepareRelease"
+ *   role-hint="releasePrepare"
  */
-public class PrepareReleaseAction
+public class ReleasePrepareAction
     extends ContinuumActionSupport
 {
     private int projectId;
@@ -76,7 +76,7 @@
 
     private ContinuumReleaseManagerListener listener;
 
-    public String execute()
+    public String input()
         throws Exception
     {
         Project project = getContinuum().getProject( projectId );
@@ -103,7 +103,7 @@
 
         processProject( project.getWorkingDirectory(), "pom.xml" );
 
-        return "prompt";
+        return SUCCESS;
     }
 
     private void getReleasePluginParameters( String workingDirectory, String pomFilename )
@@ -151,7 +151,7 @@
         }
     }
 
-    public String doPrepare()
+    public String execute()
         throws Exception
     {
         listener = new DefaultReleaseManagerListener();
@@ -169,7 +169,7 @@
         releaseId = releaseManager.prepare( project, getReleaseProperties(), getRelVersionMap(),
                                             getDevVersionMap(), listener );
 
-        return "initialized";
+        return SUCCESS;
     }
 
     public String viewResult()
diff --git a/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseProjectAction.java b/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseProjectAction.java
index 20d0a8b..06c6b55 100644
--- a/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseProjectAction.java
+++ b/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseProjectAction.java
@@ -71,7 +71,7 @@
 
         projectName = project.getName();
 
-        return "prompt";
+        return SUCCESS;
     }
 
     public String execute()
@@ -83,7 +83,14 @@
         }
         else if ( "perform".equals( goal ) )
         {
-            return "performRelease";
+            if ( "".equals( preparedReleaseId ) )
+            {
+                return "performReleaseFromScm";
+            }
+            else
+            {
+                return "performRelease";
+            }
         }
         else
         {
diff --git a/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseProjectGoalAction.java b/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseProjectGoalAction.java
new file mode 100644
index 0000000..69c04ee
--- /dev/null
+++ b/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseProjectGoalAction.java
@@ -0,0 +1,119 @@
+package org.apache.maven.continuum.web.action;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.artifact.ArtifactUtils;
+import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.release.ContinuumReleaseManager;
+import org.apache.maven.plugins.release.config.ReleaseDescriptor;
+
+import java.util.Map;
+
+/**
+ * @author Edwin Punzalan
+ *
+ * @plexus.component
+ *   role="com.opensymphony.xwork.Action"
+ *   role-hint="releaseProjectGoal"
+ */
+public class ReleaseProjectGoalAction
+    extends ContinuumActionSupport
+{
+    private int projectId;
+
+    private int projectGroupId;
+
+    private String projectName;
+
+    private String preparedReleaseName;
+
+    private String preparedReleaseId;
+
+    public String execute()
+        throws Exception
+    {
+        Project project = getContinuum().getProjectWithAllDetails( projectId );
+
+        String releaseId = ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId() );
+
+        ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
+
+        Map preparedReleases = releaseManager.getPreparedReleases();
+        if ( preparedReleases.containsKey( releaseId ) )
+        {
+            ReleaseDescriptor descriptor = (ReleaseDescriptor) preparedReleases.get( releaseId );
+
+            preparedReleaseName = descriptor.getReleaseVersions().get( releaseId ).toString();
+
+            preparedReleaseId = releaseId;
+        }
+
+        projectName = project.getName();
+
+        return SUCCESS;
+    }
+
+    public int getProjectId()
+    {
+        return projectId;
+    }
+
+    public void setProjectId( int projectId )
+    {
+        this.projectId = projectId;
+    }
+
+    public int getProjectGroupId()
+    {
+        return projectGroupId;
+    }
+
+    public void setProjectGroupId( int projectGroupId )
+    {
+        this.projectGroupId = projectGroupId;
+    }
+
+    public String getProjectName()
+    {
+        return projectName;
+    }
+
+    public void setProjectName( String projectName )
+    {
+        this.projectName = projectName;
+    }
+
+    public String getPreparedReleaseName()
+    {
+        return preparedReleaseName;
+    }
+
+    public void setPreparedReleaseName( String preparedReleaseName )
+    {
+        this.preparedReleaseName = preparedReleaseName;
+    }
+
+    public String getPreparedReleaseId()
+    {
+        return preparedReleaseId;
+    }
+
+    public void setPreparedReleaseId( String preparedReleaseId )
+    {
+        this.preparedReleaseId = preparedReleaseId;
+    }
+}
diff --git a/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ViewReleaseResultAction.java b/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ViewReleaseResultAction.java
deleted file mode 100644
index 134dd8d..0000000
--- a/continuum/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ViewReleaseResultAction.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.apache.maven.continuum.web.action;
-
-import org.apache.maven.plugins.release.ReleaseResult;
-
-/**
- * @author Edwin Punzalan
- *
- * @plexus.component
- *   role="com.opensymphony.xwork.Action"
- *   role-hint="viewReleaseResult"
- */
-public class ViewReleaseResultAction
-    extends ContinuumActionSupport
-{
-    private String releaseId;
-
-    private ReleaseResult result;
-
-    public String execute()
-        throws Exception
-    {
-        result = (ReleaseResult) getContinuum().getReleaseManager().getReleaseResults().get( releaseId );
-
-        return SUCCESS;
-    }
-
-    public String getReleaseId()
-    {
-        return releaseId;
-    }
-
-    public void setReleaseId( String releaseId )
-    {
-        this.releaseId = releaseId;
-    }
-
-    public ReleaseResult getResult()
-    {
-        return result;
-    }
-
-    public void setResult( ReleaseResult result )
-    {
-        this.result = result;
-    }
-}
diff --git a/continuum/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePerformAction-releasePerform-validation.xml b/continuum/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePerformAction-releasePerform-validation.xml
new file mode 100644
index 0000000..124b173
--- /dev/null
+++ b/continuum/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePerformAction-releasePerform-validation.xml
@@ -0,0 +1,11 @@
+<!DOCTYPE validators PUBLIC
+    "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+    "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+
+<validators>
+  <field name="goals">
+    <field-validator type="requiredstring">
+      <message key="releasePrepareAction.prepareGoals.required"/>
+    </field-validator>
+  </field>
+</validators>
diff --git a/continuum/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePerformAction-releasePerformFromScm-validation.xml b/continuum/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePerformAction-releasePerformFromScm-validation.xml
new file mode 100644
index 0000000..9170c4a
--- /dev/null
+++ b/continuum/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePerformAction-releasePerformFromScm-validation.xml
@@ -0,0 +1,36 @@
+<!DOCTYPE validators PUBLIC
+    "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+    "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+
+<validators>
+  <field name="scmUrl">
+    <field-validator type="requiredstring">
+      <message key="releasePrepareAction.scmUrl.required"/>
+    </field-validator>
+  </field>
+  <field name="scmUsername">
+    <field-validator type="requiredstring">
+      <message key="releasePrepareAction.scmUsername.required"/>
+    </field-validator>
+  </field>
+  <field name="scmPassword">
+    <field-validator type="requiredstring">
+      <message key="releasePrepareAction.scmPassword.required"/>
+    </field-validator>
+  </field>
+  <field name="scmTag">
+    <field-validator type="requiredstring">
+      <message key="releasePrepareAction.scmTag.required"/>
+    </field-validator>
+  </field>
+  <field name="scmTagBase">
+    <field-validator type="requiredstring">
+      <message key="releasePrepareAction.scmTagBase.required"/>
+    </field-validator>
+  </field>
+  <field name="goals">
+    <field-validator type="requiredstring">
+      <message key="releasePrepareAction.prepareGoals.required"/>
+    </field-validator>
+  </field>
+</validators>
diff --git a/continuum/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePrepareAction-releasePrepare-validation.xml b/continuum/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePrepareAction-releasePrepare-validation.xml
new file mode 100644
index 0000000..b89688d
--- /dev/null
+++ b/continuum/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePrepareAction-releasePrepare-validation.xml
@@ -0,0 +1,31 @@
+<!DOCTYPE validators PUBLIC
+    "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+    "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+
+<validators>
+  <field name="scmUsername">
+    <field-validator type="requiredstring">
+      <message key="releasePrepareAction.scmUsername.required"/>
+    </field-validator>
+  </field>
+  <field name="scmPassword">
+    <field-validator type="requiredstring">
+      <message key="releasePrepareAction.scmPassword.required"/>
+    </field-validator>
+  </field>
+  <field name="scmTag">
+    <field-validator type="requiredstring">
+      <message key="releasePrepareAction.scmTag.required"/>
+    </field-validator>
+  </field>
+  <field name="scmTagBase">
+    <field-validator type="requiredstring">
+      <message key="releasePrepareAction.scmTagBase.required"/>
+    </field-validator>
+  </field>
+  <field name="prepareGoals">
+    <field-validator type="requiredstring">
+      <message key="releasePrepareAction.prepareGoals.required"/>
+    </field-validator>
+  </field>
+</validators>
diff --git a/continuum/continuum-webapp/src/main/resources/xwork.xml b/continuum/continuum-webapp/src/main/resources/xwork.xml
index 3e79498..0cdc719 100644
--- a/continuum/continuum-webapp/src/main/resources/xwork.xml
+++ b/continuum/continuum-webapp/src/main/resources/xwork.xml
@@ -302,43 +302,77 @@
     <!--
     - continuum release
     -->
+    <action name="releasePromptGoal" class="releaseProject" method="promptReleaseGoal">
+      <result name="success">releaseProject.jsp</result>
+    </action>
+
     <action name="releaseProject" class="releaseProject">
-      <result name="prompt">releaseProject.jsp</result>
       <result name="prepareRelease" type="redirect-action">
-        <param name="actionName">prepareRelease</param>
+        <param name="actionName">releasePrepareInput</param>
         <param name="projectId">${projectId}</param>
       </result>
       <result name="performRelease" type="redirect-action">
-        <param name="actionName">performRelease</param>
+        <param name="actionName">releasePerformInput</param>
         <param name="projectId">${projectId}</param>
         <param name="releaseId">${preparedReleaseId}</param>
       </result>
+      <result name="performReleaseFromScm" type="redirect-action">
+        <param name="actionName">releasePerformFromScmInput</param>
+        <param name="projectId">${projectId}</param>
+      </result>
     </action>
 
-    <action name="prepareRelease" class="prepareRelease">
-      <result name="prompt">prepareRelease.jsp</result>
-      <result name="initialized" type="redirect-action">
-        <param name="actionName">prepareRelease!checkProgress.action</param>
+    <action name="releasePrepareInput" class="releasePrepare" method="input">
+      <result name="success">releasePrepare.jsp</result>
+    </action>
+
+    <action name="releasePrepare" class="releasePrepare">
+      <result name="input" type="chain">prepareReleaseInput</result>
+      <result name="success" type="redirect-action">
+        <param name="actionName">releaseInProgress</param>
         <param name="releaseId">${releaseId}</param>
         <param name="projectId">${projectId}</param>
       </result>
-      <result name="inProgress">prepareReleaseProgress.jsp</result>
-      <result name="finished">prepareReleaseFinished.jsp</result>
     </action>
 
-    <action name="performRelease" class="performRelease">
-      <result name="prompt">performRelease.jsp</result>
-      <result name="initialized" type="redirect-action">
-        <param name="actionName">performRelease!checkProgress.action</param>
+    <action name="releasePerformInput" class="releasePerform" method="input">
+      <result name="success">releasePerform.jsp</result>
+    </action>
+
+    <action name="releasePerform" class="releasePerform">
+      <result name="input" type="chain">releasePerformInput</result>
+      <result name="success" type="redirect-action">
+        <param name="actionName">releaseInProgress</param>
         <param name="releaseId">${releaseId}</param>
         <param name="projectId">${projectId}</param>
       </result>
-      <result name="inProgress">performReleaseProgress.jsp</result>
-      <result name="finished">performReleaseFinished.jsp</result>
     </action>
 
-    <action name="viewReleaseResult" class="viewReleaseResult">
-      <result name="success">viewReleaseResult.jsp</result>
+    <action name="releasePerformFromScmInput" class="releasePerform" method="inputFromScm">
+      <result name="success">releasePerformFromScm.jsp</result>
+    </action>
+
+    <action name="releasePerformFromScm" class="releasePerform" method="executeFromScm">
+      <result name="input" type="chain">releasePerformFromScmInput</result>
+      <result name="success" type="redirect-action">
+        <param name="actionName">releaseInProgress</param>
+        <param name="projectId">${projectId}</param>
+      </result>
+    </action>
+
+    <action name="releaseInProgress" class="releaseInProgress">
+      <result name="initialized">releaseInitialized.jsp</result>
+      <result name="inProgress">releaseInProgress.jsp</result>
+      <result name="success">releaseFinished.jsp</result>
+    </action>
+
+    <action name="releaseCleanup" class="releaseCleanup">
+      <result name="prepareFinished" type="chain">releasePromptGoal</result>
+      <result name="performFinished" type="chain">groupSummary</result>
+    </action>
+
+    <action name="releaseViewResult" class="releaseInProgress" method="viewResult">
+      <result name="success">releaseViewResult.jsp</result>
     </action>
 
   </package>
diff --git a/continuum/continuum-webapp/src/main/webapp/components/projectSummaryComponent.jsp b/continuum/continuum-webapp/src/main/webapp/components/projectSummaryComponent.jsp
index ca8567d..dfd81f5 100644
--- a/continuum/continuum-webapp/src/main/webapp/components/projectSummaryComponent.jsp
+++ b/continuum/continuum-webapp/src/main/webapp/components/projectSummaryComponent.jsp
@@ -58,7 +58,7 @@
       <ec:column property="releaseAction" title="&nbsp;" width="1%" sortable="false">
         <c:choose>
           <c:when test="${pageScope.project.state == 2}">
-            <ww:url id="releaseProjectUrl" action="releaseProject!promptReleaseGoal.action" namespace="/">
+            <ww:url id="releaseProjectUrl" action="releasePromptGoal" namespace="/">
               <ww:param name="projectId" value="${project.id}"/>
             </ww:url>
             <ww:a href="%{releaseProjectUrl}">
diff --git a/continuum/continuum-webapp/src/main/webapp/performRelease.jsp b/continuum/continuum-webapp/src/main/webapp/performRelease.jsp
deleted file mode 100644
index 3deced8..0000000
--- a/continuum/continuum-webapp/src/main/webapp/performRelease.jsp
+++ /dev/null
@@ -1,30 +0,0 @@
-<%@ taglib uri="/webwork" prefix="ww" %>
-<html>
-  <ww:i18n name="localization.Continuum">
-    <head>
-        <title><ww:text name="releaseProject.page.title"/></title>
-    </head>
-    <body>
-      <h2>Perform Project Release</h2>
-      <ww:form action="performRelease!doPerform.action" method="post">
-        <h3>Common Release Parameters</h3>
-        <ww:hidden name="projectId"/>
-        <ww:hidden name="releaseId"/>
-        <div class="axial">
-          <table border="1" cellspacing="2" cellpadding="3" width="100%">
-            <ww:if test="releaseId.equals(\"\")">
-              <ww:textfield label="SCM Connection URL" name="scmUrl"/>
-              <ww:textfield label="SCM Username" name="scmUsername"/>
-              <ww:textfield label="SCM Password" name="scmPassword"/>
-              <ww:textfield label="SCM Tag" name="scmTag"/>
-              <ww:textfield label="SCM Tag Base" name="scmTagBase"/>
-            </ww:if>
-            <ww:textfield label="Maven Arguments" name="goals"/>
-            <ww:checkbox label="Use Release Profile" name="useReleaseProfile" value="true"/>
-          </table>
-        </div>
-        <ww:submit/>
-      </ww:form>
-    </body>
-  </ww:i18n>
-</html>
diff --git a/continuum/continuum-webapp/src/main/webapp/performReleaseProgress.jsp b/continuum/continuum-webapp/src/main/webapp/performReleaseProgress.jsp
deleted file mode 100644
index 80b1084..0000000
--- a/continuum/continuum-webapp/src/main/webapp/performReleaseProgress.jsp
+++ /dev/null
@@ -1,61 +0,0 @@
-<%@ taglib uri="/webwork" prefix="ww" %>
-<html>
-  <ww:i18n name="localization.Continuum">
-    <head>
-        <title><ww:text name="releaseProject.page.title"/></title>
-        <meta http-equiv="refresh" content="10;url=<ww:url includeParams="all" />"/>
-    </head>
-    <body>
-      <h2><ww:text name="performReleaseProgress.section.title"/></h2>
-      <h3><ww:property value="name"/></h3>
-      <ww:form action="performRelease!checkProgress.action" method="get">
-        <ww:hidden name="projectId"/>
-        <ww:hidden name="releaseId"/>
-        <ww:if test="listener.state == 0">
-          <p>
-            The release goal is currently initializing...
-          </p>
-          <p>
-            Please wait while the server prepares your project for release.
-          </p>
-        </ww:if>
-        <ww:else>
-          <div class="axial">
-            <table width="100%">
-              <tr>
-                <th><ww:text name="releaseProject.status"/></th>
-                <th width="100%"><ww:text name="releaseProject.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">
-                  </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">
-                  </ww:else>
-                  </td>
-                  <td><ww:property/></td>
-                </tr>
-              </ww:iterator>
-            </table>
-          </div>
-        </ww:else>
-        <ww:submit value="Refresh"/>
-      </ww:form>
-    </body>
-  </ww:i18n>
-</html>
diff --git a/continuum/continuum-webapp/src/main/webapp/prepareReleaseProgress.jsp b/continuum/continuum-webapp/src/main/webapp/prepareReleaseProgress.jsp
deleted file mode 100644
index 1c38cfc..0000000
--- a/continuum/continuum-webapp/src/main/webapp/prepareReleaseProgress.jsp
+++ /dev/null
@@ -1,61 +0,0 @@
-<%@ taglib uri="/webwork" prefix="ww" %>
-<html>
-  <ww:i18n name="localization.Continuum">
-    <head>
-        <title><ww:text name="releaseProject.page.title"/></title>
-        <meta http-equiv="refresh" content="10;url=<ww:url includeParams="all" />"/>
-    </head>
-    <body>
-      <h2><ww:text name="prepareReleaseProgress.section.title"/></h2>
-      <h3><ww:property value="name"/></h3>
-      <ww:form action="prepareRelease!checkProgress.action" method="get">
-        <ww:hidden name="projectId"/>
-        <ww:hidden name="releaseId"/>
-        <ww:if test="listener.state == 0">
-          <p>
-            The release goal is currently initializing...
-          </p>
-          <p>
-            Please wait while the server prepares your project for release.
-          </p>
-        </ww:if>
-        <ww:else>
-          <div class="axial">
-            <table width="100%">
-              <tr>
-                <th><ww:text name="releaseProject.status"/></th>
-                <th width="100%"><ww:text name="releaseProject.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">
-                  </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">
-                  </ww:else>
-                  </td>
-                  <td><ww:property/></td>
-                </tr>
-              </ww:iterator>
-            </table>
-          </div>
-        </ww:else>
-        <ww:submit value="Refresh"/>
-      </ww:form>
-    </body>
-  </ww:i18n>
-</html>
diff --git a/continuum/continuum-webapp/src/main/webapp/prepareReleaseFinished.jsp b/continuum/continuum-webapp/src/main/webapp/releaseFinished.jsp
similarity index 89%
rename from continuum/continuum-webapp/src/main/webapp/prepareReleaseFinished.jsp
rename to continuum/continuum-webapp/src/main/webapp/releaseFinished.jsp
index cd2d687..3e758fc 100644
--- a/continuum/continuum-webapp/src/main/webapp/prepareReleaseFinished.jsp
+++ b/continuum/continuum-webapp/src/main/webapp/releaseFinished.jsp
@@ -7,8 +7,9 @@
     <body>
       <h2><ww:text name="prepareReleaseFinished.section.title"/></h2>
       <h3><ww:property value="name"/></h3>
-      <ww:form action="releaseProject!promptReleaseGoal.action" method="post">
+      <ww:form action="releaseCleanup" method="post">
         <ww:hidden name="projectId"/>
+        <ww:hidden name="releaseId"/>
         <div class="axial">
           <table width="100%">
             <tr>
@@ -44,10 +45,10 @@
         </div>
 
         <p>
-          <ww:url id="viewReleaseResultUrl" action="viewReleaseResult" namespace="/">
+          <ww:url id="releaseViewResultUrl" action="releaseViewResult" namespace="/">
             <ww:param name="releaseId" value="releaseId"/>
           </ww:url>
-          <ww:a href="%{viewReleaseResultUrl}"><ww:text name="releaseProject.viewOutput"/></ww:a>
+          <ww:a href="%{releaseViewResultUrl}"><ww:text name="releaseProject.viewOutput"/></ww:a>
         </p>
 
         <ww:submit value="Done"/>
diff --git a/continuum/continuum-webapp/src/main/webapp/performReleaseFinished.jsp b/continuum/continuum-webapp/src/main/webapp/releaseInProgress.jsp
similarity index 79%
rename from continuum/continuum-webapp/src/main/webapp/performReleaseFinished.jsp
rename to continuum/continuum-webapp/src/main/webapp/releaseInProgress.jsp
index 3823315..2892c02 100644
--- a/continuum/continuum-webapp/src/main/webapp/performReleaseFinished.jsp
+++ b/continuum/continuum-webapp/src/main/webapp/releaseInProgress.jsp
@@ -3,11 +3,14 @@
   <ww:i18n name="localization.Continuum">
     <head>
         <title><ww:text name="releaseProject.page.title"/></title>
+        <meta http-equiv="refresh" content="10;url=<ww:url includeParams="all" />"/>
     </head>
     <body>
-      <h2><ww:text name="performReleaseFinished.section.title"/></h2>
+      <h2><ww:text name="prepareReleaseProgress.section.title"/></h2>
       <h3><ww:property value="name"/></h3>
-      <ww:form action="groupSummary" method="post">
+      <ww:form action="releaseInProgress" method="get">
+        <ww:hidden name="projectId"/>
+        <ww:hidden name="releaseId"/>
         <div class="axial">
           <table width="100%">
             <tr>
@@ -41,15 +44,7 @@
             </ww:iterator>
           </table>
         </div>
-
-        <p>
-          <ww:url id="viewReleaseResultUrl" action="viewReleaseResult" namespace="/">
-            <ww:param name="releaseId" value="releaseId"/>
-          </ww:url>
-          <ww:a href="%{viewReleaseResultUrl}"><ww:text name="releaseProject.viewOutput"/></ww:a>
-        </p>
-
-        <ww:submit value="Done"/>
+        <ww:submit value="Refresh"/>
       </ww:form>
     </body>
   </ww:i18n>
diff --git a/continuum/continuum-webapp/src/main/webapp/releaseInitialized.jsp b/continuum/continuum-webapp/src/main/webapp/releaseInitialized.jsp
new file mode 100644
index 0000000..689d3bb
--- /dev/null
+++ b/continuum/continuum-webapp/src/main/webapp/releaseInitialized.jsp
@@ -0,0 +1,24 @@
+<%@ taglib uri="/webwork" prefix="ww" %>
+<html>
+  <ww:i18n name="localization.Continuum">
+    <head>
+        <title><ww:text name="releaseProject.page.title"/></title>
+        <meta http-equiv="refresh" content="10;url=<ww:url includeParams="all" />"/>
+    </head>
+    <body>
+      <h2><ww:text name="prepareReleaseProgress.section.title"/></h2>
+      <h3><ww:property value="name"/></h3>
+      <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>
+  </ww:i18n>
+</html>
diff --git a/continuum/continuum-webapp/src/main/webapp/releasePerform.jsp b/continuum/continuum-webapp/src/main/webapp/releasePerform.jsp
new file mode 100644
index 0000000..ea4897d
--- /dev/null
+++ b/continuum/continuum-webapp/src/main/webapp/releasePerform.jsp
@@ -0,0 +1,23 @@
+<%@ taglib uri="/webwork" prefix="ww" %>
+<html>
+  <ww:i18n name="localization.Continuum">
+    <head>
+        <title><ww:text name="releaseProject.page.title"/></title>
+    </head>
+    <body>
+      <h2>Perform Project Release</h2>
+      <ww:form action="releasePerform" method="post" validate="true">
+        <h3>Release Perform Parameters</h3>
+        <ww:hidden name="projectId"/>
+        <ww:hidden name="releaseId"/>
+        <div class="axial">
+          <table border="1" cellspacing="2" cellpadding="3" width="100%">
+            <ww:textfield label="Maven Arguments" name="goals" value="clean deploy"/>
+            <ww:checkbox label="Use Release Profile" name="useReleaseProfile" value="true"/>
+          </table>
+        </div>
+        <ww:submit/>
+      </ww:form>
+    </body>
+  </ww:i18n>
+</html>
diff --git a/continuum/continuum-webapp/src/main/webapp/releasePerformFromScm.jsp b/continuum/continuum-webapp/src/main/webapp/releasePerformFromScm.jsp
new file mode 100644
index 0000000..8656ba8
--- /dev/null
+++ b/continuum/continuum-webapp/src/main/webapp/releasePerformFromScm.jsp
@@ -0,0 +1,28 @@
+<%@ taglib uri="/webwork" prefix="ww" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<html>
+  <ww:i18n name="localization.Continuum">
+    <head>
+        <title><ww:text name="releaseProject.page.title"/></title>
+    </head>
+    <body>
+      <h2>Perform Project Release</h2>
+      <ww:form action="releasePerformFromScm" method="post" validate="true">
+        <h3>Release Perform Parameters</h3>
+        <ww:hidden name="projectId"/>
+        <div class="axial">
+          <table border="1" cellspacing="2" cellpadding="3" width="100%">
+            <ww:textfield label="SCM Connection URL" name="scmUrl"/>
+            <ww:textfield label="SCM Username" name="scmUsername"/>
+            <ww:textfield label="SCM Password" name="scmPassword"/>
+            <ww:textfield label="SCM Tag" name="scmTag"/>
+            <ww:textfield label="SCM Tag Base" name="scmTagBase"/>
+            <ww:textfield label="Maven Arguments" name="goals" value="clean deploy"/>
+            <ww:checkbox label="Use Release Profile" name="useReleaseProfile" value="true"/>
+          </table>
+        </div>
+        <ww:submit/>
+      </ww:form>
+    </body>
+  </ww:i18n>
+</html>
diff --git a/continuum/continuum-webapp/src/main/webapp/prepareRelease.jsp b/continuum/continuum-webapp/src/main/webapp/releasePrepare.jsp
similarity index 91%
rename from continuum/continuum-webapp/src/main/webapp/prepareRelease.jsp
rename to continuum/continuum-webapp/src/main/webapp/releasePrepare.jsp
index d534151..4065a3c 100644
--- a/continuum/continuum-webapp/src/main/webapp/prepareRelease.jsp
+++ b/continuum/continuum-webapp/src/main/webapp/releasePrepare.jsp
@@ -2,11 +2,12 @@
 <html>
   <ww:i18n name="localization.Continuum">
     <head>
-        <title><ww:text name="releaseProject.page.title"/></title>
+      <title><ww:text name="releaseProject.page.title"/></title>
+      <ww:head />
     </head>
     <body>
       <h2><ww:text name="prepareRelease.section.title"/></h2>
-      <ww:form action="prepareRelease!doPrepare.action" method="post">
+      <ww:form action="releasePrepare" method="post" validate="true">
         <h3><ww:text name="prepareRelease.releaseParameters"/></h3>
         <input type="hidden" name="projectId" value="<ww:property value="projectId"/>"/>
         <div class="axial">
diff --git a/continuum/continuum-webapp/src/main/webapp/releaseResult.jsp b/continuum/continuum-webapp/src/main/webapp/releaseResult.jsp
deleted file mode 100644
index e69de29..0000000
--- a/continuum/continuum-webapp/src/main/webapp/releaseResult.jsp
+++ /dev/null
diff --git a/continuum/continuum-webapp/src/main/webapp/viewReleaseResult.jsp b/continuum/continuum-webapp/src/main/webapp/releaseViewResult.jsp
similarity index 100%
rename from continuum/continuum-webapp/src/main/webapp/viewReleaseResult.jsp
rename to continuum/continuum-webapp/src/main/webapp/releaseViewResult.jsp