continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r165445 - in /maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc: ContinuumXmlRpc.java DefaultContinuumXmlRpc.java
Date Sun, 01 May 2005 02:06:55 GMT
Author: jvanzyl
Date: Sat Apr 30 19:06:54 2005
New Revision: 165445

URL: http://svn.apache.org/viewcvs?rev=165445&view=rev
Log:
o starting to add the project specific methods to the interface,
  specifically making the addMavenTwoProject() method available for a couple
  scripts I'm about to add.
  

Modified:
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java?rev=165445&r1=165444&r2=165445&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
Sat Apr 30 19:06:54 2005
@@ -27,14 +27,9 @@
     String ROLE = ContinuumXmlRpc.class.getName();
 
     // ----------------------------------------------------------------------
-    //
+    // Project handling
     // ----------------------------------------------------------------------
 
-    Hashtable addProjectFromUrl( String url, String builderType );
-
-    Hashtable addProjectFromScm( String scmUrl, String builderType, String projectName, String
nagEmailAddress,
-                                 String version, Hashtable configuration );
-
     Hashtable getProject( String projectId );
 
     Hashtable updateProjectFromScm( String projectId );
@@ -46,7 +41,7 @@
     Hashtable removeProject( String projectId );
 
     // ----------------------------------------------------------------------
-    //
+    // Build handling
     // ----------------------------------------------------------------------
 
     Hashtable buildProject( String projectId );
@@ -56,4 +51,37 @@
     Hashtable getBuild( String buildId );
 
     Hashtable getBuildResult( String buildId );
+
+    // ----------------------------------------------------------------------
+    // Maven 2.x projects
+    // ----------------------------------------------------------------------
+
+    Hashtable addMavenTwoProject( String url );
+
+    // ----------------------------------------------------------------------
+    // Maven 1.x projects
+    // ----------------------------------------------------------------------
+
+    Hashtable addMavenOneProject( String url );
+
+
+    // ----------------------------------------------------------------------
+    // Ant projects
+    // ----------------------------------------------------------------------
+
+    Hashtable addAntProject( String scmUrl,
+                             String projectName,
+                             String nagEmailAddress,
+                             String version,
+                             Hashtable configuration );
+
+    // ----------------------------------------------------------------------
+    // Shell projects
+    // ----------------------------------------------------------------------
+
+    Hashtable addShellProject( String scmUrl,
+                               String projectName,
+                               String nagEmailAddress,
+                               String version,
+                               Hashtable configuration );
 }

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java?rev=165445&r1=165444&r2=165445&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
Sat Apr 30 19:06:54 2005
@@ -26,6 +26,10 @@
 import java.util.Vector;
 
 import org.apache.maven.continuum.Continuum;
+import org.apache.maven.continuum.builder.maven.m2.MavenShellBuilder;
+import org.apache.maven.continuum.builder.maven.m1.Maven1Builder;
+import org.apache.maven.continuum.builder.ant.AntBuilder;
+import org.apache.maven.continuum.builder.shell.ShellBuilder;
 import org.apache.maven.continuum.scm.CheckOutScmResult;
 import org.apache.maven.continuum.scm.UpdateScmResult;
 import org.apache.maven.continuum.scm.ScmFile;
@@ -55,14 +59,72 @@
     private XmlRpcHelper xmlRpcHelper;
 
     // ----------------------------------------------------------------------
-    // ContinuumXmlRpc Implementation
+    // Maven 2.x projects
     // ----------------------------------------------------------------------
 
+    public Hashtable addMavenTwoProject( String url )
+    {
+        try
+        {
+            String projectId = continuum.addProjectFromUrl( url, MavenShellBuilder.ID );
+
+            return makeHashtable( "projectId", projectId );
+        }
+        catch ( Throwable e )
+        {
+            return handleException( "ContinuumXmlRpc.addProjectFromScm(): url: '" + url +
"'.", e );
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    // Maven 2.x projects
+    // ----------------------------------------------------------------------
+
+    public Hashtable addMavenOneProject( String url )
+    {
+        try
+        {
+            String projectId = continuum.addProjectFromUrl( url, Maven1Builder.ID );
+
+            return makeHashtable( "projectId", projectId );
+        }
+        catch ( Throwable e )
+        {
+            return handleException( "ContinuumXmlRpc.addProjectFromScm(): url: '" + url +
"'.", e );
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    // Ant projects
+    // ----------------------------------------------------------------------
+
+    public Hashtable addAntProject( String scmUrl,
+                                    String projectName,
+                                    String nagEmailAddress,
+                                    String version,
+                                    Hashtable configuration )
+    {
+        return addProjectFromScm( scmUrl, AntBuilder.ID, projectName, nagEmailAddress, version,
configuration );
+    }
+
+    // ----------------------------------------------------------------------
+    // Shell projects
+    // ----------------------------------------------------------------------
+
+    public Hashtable addShellProject( String scmUrl,
+                                      String projectName,
+                                      String nagEmailAddress,
+                                      String version,
+                                      Hashtable configuration )
+    {
+        return addProjectFromScm( scmUrl, ShellBuilder.ID, projectName, nagEmailAddress,
version, configuration );
+    }
+
     // ----------------------------------------------------------------------
     // Projects
     // ----------------------------------------------------------------------
 
-    public Hashtable addProjectFromUrl( String url, String builderType )
+    protected Hashtable addProjectFromUrl( String url, String builderType )
     {
         try
         {
@@ -76,12 +138,12 @@
         }
     }
 
-    public Hashtable addProjectFromScm( String scmUrl,
-                                        String builderType,
-                                        String projectName,
-                                        String nagEmailAddress,
-                                        String version,
-                                        Hashtable configuration )
+    protected Hashtable addProjectFromScm( String scmUrl,
+                                           String builderType,
+                                           String projectName,
+                                           String nagEmailAddress,
+                                           String version,
+                                           Hashtable configuration )
     {
         try
         {



Mime
View raw message