continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wsm...@apache.org
Subject svn commit: r637700 - /continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
Date Mon, 17 Mar 2008 02:07:46 GMT
Author: wsmoak
Date: Sun Mar 16 19:07:44 2008
New Revision: 637700

URL: http://svn.apache.org/viewvc?rev=637700&view=rev
Log:
CONTINUUM-1692 Remove all build results, instead of only the latest one.

Modified:
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java

Modified: continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java?rev=637700&r1=637699&r2=637700&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
(original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
Sun Mar 16 19:07:44 2008
@@ -19,12 +19,7 @@
  * under the License.
  */
 
-import org.apache.maven.continuum.xmlrpc.project.AddingResult;
-import org.apache.maven.continuum.xmlrpc.project.BuildDefinition;
-import org.apache.maven.continuum.xmlrpc.project.BuildResult;
-import org.apache.maven.continuum.xmlrpc.project.ProjectDependency;
-import org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary;
-import org.apache.maven.continuum.xmlrpc.project.ProjectSummary;
+import org.apache.maven.continuum.xmlrpc.project.*;
 import org.apache.maven.continuum.xmlrpc.scm.ChangeSet;
 import org.apache.maven.continuum.xmlrpc.scm.ScmResult;
 
@@ -123,11 +118,17 @@
 
         System.out.println();
 
-        System.out.println( "Removing latest build result." );
+        System.out.println( "Removing build results." );
         System.out.println( "============================" );
-        BuildResult lbr = client.getLatestBuildResult( ps.getId() );
-        System.out.println( "Removing build result " + lbr.getId() );
-        client.removeBuildResult( lbr );
+        BuildResultSummary brs;
+        List results = client.getBuildResultsForProject( ps.getId() );
+        for ( Iterator i = results.iterator(); i.hasNext(); )
+        {
+            brs = (BuildResultSummary) i.next();
+            System.out.print( "Removing build result (" + brs.getId() + ") - " );
+            BuildResult br = client.getBuildResult( ps.getId(), brs.getId() );
+            System.out.println( (client.removeBuildResult( br ) == 0 ? "OK" : "Error" ) );
+        }
         System.out.println( "Done.");
 
         System.out.println();



Mime
View raw message