continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1101349 - in /continuum/trunk/continuum-xmlrpc: continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/
Date Tue, 10 May 2011 07:18:54 GMT
Author: ctan
Date: Tue May 10 07:18:54 2011
New Revision: 1101349

URL: http://svn.apache.org/viewvc?rev=1101349&view=rev
Log:
[CONTINUUM-2620] fixed variable

Modified:
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.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=1101349&r1=1101348&r2=1101349&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
Tue May 10 07:18:54 2011
@@ -22,6 +22,7 @@ package org.apache.maven.continuum.xmlrp
 import org.apache.continuum.xmlrpc.repository.DirectoryPurgeConfiguration;
 import org.apache.continuum.xmlrpc.repository.LocalRepository;
 import org.apache.continuum.xmlrpc.repository.RepositoryPurgeConfiguration;
+import org.apache.continuum.xmlrpc.utils.BuildTrigger;
 import org.apache.maven.continuum.xmlrpc.project.AddingResult;
 import org.apache.maven.continuum.xmlrpc.project.BuildDefinition;
 import org.apache.maven.continuum.xmlrpc.project.BuildResult;
@@ -29,8 +30,10 @@ import org.apache.maven.continuum.xmlrpc
 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.Schedule;
 import org.apache.maven.continuum.xmlrpc.scm.ChangeSet;
 import org.apache.maven.continuum.xmlrpc.scm.ScmResult;
+import org.apache.maven.continuum.xmlrpc.system.Installation;
 
 import java.net.URL;
 import java.util.Iterator;
@@ -48,7 +51,7 @@ public class SampleClient
         throws Exception
     {
         client = new ContinuumXmlRpcClient( new URL( args[0] ), args[1], args[2] );
-
+/*
         System.out.println( "Adding project..." );
         AddingResult result = client.addMavenTwoProject( "http://svn.apache.org/repos/asf/continuum/sandbox/simple-example/pom.xml"
);
         if ( result.hasErrors() )
@@ -90,10 +93,21 @@ public class SampleClient
             Thread.sleep( 1000 );
         }
 
-        System.out.println();
+        System.out.println();*/
 
+        
+        BuildDefinition buildDef = new BuildDefinition();
+        buildDef.setArguments( "A-Za-z0-9_./=,\": \\-" );
+        buildDef.setSchedule( client.getSchedule( 1 ) );
+        client.addBuildDefinitionToProjectGroup( 1, buildDef );
+        
+        /*
+        ProjectSummary ps = client.getProjectSummary( 1 );
         System.out.println( "Add the project to the build queue." );
-        client.buildProject( ps.getId() );
+        BuildTrigger trigger = new BuildTrigger();
+        trigger.setTrigger( 1 );
+        trigger.setTriggeredBy( "<script>alert('hahaha' )</script>" );
+        client.buildProject( ps.getId(), trigger );
         while ( !"Building".equals( client.getProjectStatusAsString( ps.getState() ) ) )
         {
             ps = client.refreshProjectSummary( ps );
@@ -137,7 +151,7 @@ public class SampleClient
         }
         System.out.println( "Done.");
 
-        System.out.println();
+        System.out.println();/*
 
         System.out.println( "Projects list." );
         System.out.println( "=====================" );
@@ -217,7 +231,7 @@ public class SampleClient
         System.out.println( "Removing Local Repository '" + repository.getName() + "' ("
+ 
                             repository.getId() + ")..." );
         client.removeLocalRepository( repository.getId() );
-        System.out.println( "Done." );
+        System.out.println( "Done." );*/
     }
 
     public static void printProjectGroupSummary( ProjectGroupSummary pg )

Modified: continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java?rev=1101349&r1=1101348&r2=1101349&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
(original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
Tue May 10 07:18:54 2011
@@ -2206,14 +2206,14 @@ public class ContinuumServiceImpl
             return null;
         }
 
-        if ( StringUtils.isNotBlank( g.getGroupId() ) &&
-                        !g.getGroupId().matches( PROJECTGROUP_ID_VALID_EXPRESSION ) )
+        if ( StringUtils.isNotBlank( group.getGroupId() ) &&
+                        !group.getGroupId().matches( PROJECTGROUP_ID_VALID_EXPRESSION ) )
         {
             throw new ContinuumException( "ProjectGroup Id contains invalid characters" );
         }
 
-        if ( StringUtils.isNotBlank( g.getName() ) &&
-                        !g.getName().matches( NAME_VALID_EXPRESSION ) )
+        if ( StringUtils.isNotBlank( group.getName() ) &&
+                        !group.getName().matches( NAME_VALID_EXPRESSION ) )
         {
             throw new ContinuumException( "ProjectGroup Name contains invalid characters"
);
         }



Mime
View raw message