continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r447497 - in /maven/continuum/branches/continuum-acegi/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ resources/ resources/localization/ webapp/
Date Mon, 18 Sep 2006 18:26:27 GMT
Author: carlos
Date: Mon Sep 18 11:26:26 2006
New Revision: 447497

URL: http://svn.apache.org/viewvc?view=rev&rev=447497
Log:
Merged rev# 447494 from trunk

Modified:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PerformReleaseAction.java
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PrepareReleaseAction.java
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/localization/Continuum.properties
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/performRelease.jsp
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/performReleaseProgress.jsp
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/prepareReleaseProgress.jsp

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PerformReleaseAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PerformReleaseAction.java?view=diff&rev=447497&r1=447496&r2=447497
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PerformReleaseAction.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PerformReleaseAction.java
Mon Sep 18 11:26:26 2006
@@ -120,7 +120,7 @@
 
         releaseManager.perform( releaseId, performDirectory, goals, useReleaseProfile, listener
);
 
-        return checkProgress();
+        return "initialized";
     }
 
     public String checkProgress()
@@ -132,9 +132,9 @@
 
         listener = (ContinuumReleaseManagerListener) releaseManager.getListeners().get( releaseId
);
 
-        if ( listener.getState() == ContinuumReleaseManagerListener.INITIALIZED )
+        if ( listener.getState() == ContinuumReleaseManagerListener.FINISHED )
         {
-            status = "initialized";
+            status = "finished";
         }
         else
         {

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PrepareReleaseAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PrepareReleaseAction.java?view=diff&rev=447497&r1=447496&r2=447497
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PrepareReleaseAction.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/PrepareReleaseAction.java
Mon Sep 18 11:26:26 2006
@@ -18,23 +18,25 @@
 
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.release.ContinuumReleaseManager;
-import org.apache.maven.continuum.release.DefaultReleaseManagerListener;
 import org.apache.maven.continuum.release.ContinuumReleaseManagerListener;
-import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.continuum.release.DefaultReleaseManagerListener;
 import org.apache.maven.model.Model;
-import org.apache.maven.plugins.release.versions.VersionInfo;
-import org.apache.maven.plugins.release.versions.DefaultVersionInfo;
+import org.apache.maven.model.Plugin;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
 import org.apache.maven.plugins.release.ReleaseResult;
+import org.apache.maven.plugins.release.versions.DefaultVersionInfo;
+import org.apache.maven.plugins.release.versions.VersionInfo;
 import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
 
+import java.io.File;
+import java.io.FileReader;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
-import java.util.Iterator;
-import java.util.ArrayList;
-import java.io.FileReader;
-import java.io.File;
 
 /**
  * @author Edwin Punzalan
@@ -94,11 +96,58 @@
         }
         prepareGoals = "clean integration-test";
 
+        getReleasePluginParameters( project.getWorkingDirectory(), "pom.xml" );
+
         processProject( project.getWorkingDirectory(), "pom.xml" );
 
         return "prompt";
     }
 
+    private void getReleasePluginParameters( String workingDirectory, String pomFilename
)
+        throws Exception
+    {
+        MavenXpp3Reader pomReader = new MavenXpp3Reader();
+        Model model = pomReader.read( new FileReader( new File( workingDirectory, pomFilename
) ) );
+
+        if ( model.getBuild() != null && model.getBuild().getPlugins() != null )
+        {
+            for( Iterator plugins = model.getBuild().getPlugins().iterator(); plugins.hasNext();
)
+            {
+                Plugin plugin = (Plugin) plugins.next();
+
+                if ( plugin.getGroupId() != null && plugin.getGroupId().equals( "org.apache.maven.plugins"
) &&
+                     plugin.getArtifactId() != null && plugin.getArtifactId().equals(
"maven-release-plugin" ) )
+                {
+                    Xpp3Dom dom = (Xpp3Dom) plugin.getConfiguration();
+
+                    Xpp3Dom configuration = dom.getChild( "releaseLabel" );
+                    if ( configuration != null )
+                    {
+                        scmTag = configuration.getValue();
+                    }
+
+                    configuration = dom.getChild( "tag" );
+                    if ( configuration != null )
+                    {
+                        scmTag = configuration.getValue();
+                    }
+
+                    configuration = dom.getChild( "tagBase" );
+                    if ( configuration != null )
+                    {
+                        scmTagBase = configuration.getValue();
+                    }
+
+                    configuration = dom.getChild( "preparationGoals" );
+                    if ( configuration != null )
+                    {
+                        prepareGoals = configuration.getValue();
+                    }
+                }
+            }
+        }
+    }
+
     public String doPrepare()
         throws Exception
     {
@@ -117,7 +166,7 @@
         releaseId = releaseManager.prepare( project, getReleaseProperties(), getRelVersionMap(),
                                             getDevVersionMap(), listener );
 
-        return checkProgress();
+        return "initialized";
     }
 
     public String viewResult()

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/localization/Continuum.properties?view=diff&rev=447497&r1=447496&r2=447497
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/localization/Continuum.properties
Mon Sep 18 11:26:26 2006
@@ -412,7 +412,7 @@
 
 releaseProject.prepareReleaseOption=Prepare project for release
 releaseProject.performReleaseOption=Perform project release
-releaseProject.provideReleaseParameters=Project Release Parameters
+releaseProject.provideReleaseParameters=Provide Release Parameters
 releaseProject.status=Status
 releaseProject.phase=Phase
 releaseProject.viewOutput=View Output

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml?view=diff&rev=447497&r1=447496&r2=447497
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml
Mon Sep 18 11:26:26 2006
@@ -273,12 +273,22 @@
 
     <action name="prepareRelease" class="prepareRelease">
       <result name="prompt">prepareRelease.jsp</result>
+      <result name="initialized" type="redirect-action">
+        <param name="actionName">prepareRelease!checkProgress.action</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>
+        <param name="releaseId">${releaseId}</param>
+        <param name="projectId">${projectId}</param>
+      </result>
       <result name="inProgress">performReleaseProgress.jsp</result>
       <result name="finished">performReleaseFinished.jsp</result>
     </action>

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/performRelease.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/performRelease.jsp?view=diff&rev=447497&r1=447496&r2=447497
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/performRelease.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/performRelease.jsp
Mon Sep 18 11:26:26 2006
@@ -12,7 +12,7 @@
         <ww:hidden name="releaseId"/>
         <div class="axial">
           <table border="1" cellspacing="2" cellpadding="3" width="100%">
-            <ww:if test="releaseId.length == 0">
+            <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"/>

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/performReleaseProgress.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/performReleaseProgress.jsp?view=diff&rev=447497&r1=447496&r2=447497
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/performReleaseProgress.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/performReleaseProgress.jsp
Mon Sep 18 11:26:26 2006
@@ -11,9 +11,12 @@
       <ww:form action="performRelease!checkProgress.action" method="get">
         <ww:hidden name="projectId"/>
         <ww:hidden name="releaseId"/>
-        <ww:if test="listener.phases.size == 0">
+        <ww:if test="listener.state == 0">
           <p>
-            The release goal is currently initializing... Please wait while server prepares
your project for release.
+            The release goal is currently initializing...
+          </p>
+          <p>
+            Please wait while the server prepares your project for release.
           </p>
         </ww:if>
         <ww:else>

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/prepareReleaseProgress.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/prepareReleaseProgress.jsp?view=diff&rev=447497&r1=447496&r2=447497
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/prepareReleaseProgress.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/prepareReleaseProgress.jsp
Mon Sep 18 11:26:26 2006
@@ -11,9 +11,12 @@
       <ww:form action="prepareRelease!checkProgress.action" method="get">
         <ww:hidden name="projectId"/>
         <ww:hidden name="releaseId"/>
-        <ww:if test="listener.phases.size == 0">
+        <ww:if test="listener.state == 0">
           <p>
-            The release goal is currently initializing... Please wait while server prepares
your project for release.
+            The release goal is currently initializing...
+          </p>
+          <p>
+            Please wait while the server prepares your project for release.
           </p>
         </ww:if>
         <ww:else>



Mime
View raw message