continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r982247 - in /continuum/trunk/continuum-xmlrpc: continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ continuum-xmlrpc-server/src/main/java/org/...
Date Wed, 04 Aug 2010 13:39:16 GMT
Author: ctan
Date: Wed Aug  4 13:39:16 2010
New Revision: 982247

URL: http://svn.apache.org/viewvc?rev=982247&view=rev
Log:
[CONTINUUM-2549] overloaded addMavenTwoProject to be able to use single checkout in XMLRPC
Submitted By: Teody Cue Jr.


Modified:
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.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-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java?rev=982247&r1=982246&r2=982247&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
(original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
Wed Aug  4 13:39:16 2010
@@ -713,6 +713,30 @@ public interface ContinuumService
     Map<String, Object> addMavenTwoProjectRPC( String url, int projectGroupId )
         throws Exception;
 
+    /**
+     * Add a maven 2.x project from an url.
+     *
+     * @param url                       The POM url
+     * @param projectGroupId            The id of the group where projects will be stored
+     * @Param checkoutInSingleDirectory Determines whether the project will be stored on
a single directory
+     * @return The result of the action with the list of projects created
+     * @throws Exception
+     */
+    AddingResult addMavenTwoProject( String url, int projectGroupId, boolean checkoutInSingleDirectory
)
+        throws Exception;
+
+    /**
+     * Same method but compatible with standard XMLRPC
+     *
+     * @param url                       The POM url
+     * @param projectGroupId            The id of the group where projects will be stored
+     * @Param checkoutInSingleDirectory Determines whether the project will be stored on
a single directory
+     * @return The result of the action with the list of projects created as RPC value
+     * @throws Exception
+     */
+    Map<String, Object> addMavenTwoProjectRPC( String url, int projectGroupId, boolean
checkoutInSingleDirectory )
+        throws Exception;
+
     // ----------------------------------------------------------------------
     // Maven 1.x projects
     // ----------------------------------------------------------------------

Modified: continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java?rev=982247&r1=982246&r2=982247&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java
(original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/ContinuumXmlRpcClient.java
Wed Aug  4 13:39:16 2010
@@ -392,6 +392,12 @@ public class ContinuumXmlRpcClient
         return continuum.addMavenTwoProject( url, projectGroupId );
     }
 
+    public AddingResult addMavenTwoProject( String url, int projectGroupId, boolean checkoutInSingleDirectory
)
+        throws Exception
+    {
+        return continuum.addMavenTwoProject( url, projectGroupId, checkoutInSingleDirectory
);
+    }
+
     // ----------------------------------------------------------------------
     // Maven 1.x projects
     // ----------------------------------------------------------------------
@@ -703,6 +709,12 @@ public class ContinuumXmlRpcClient
         return continuum.addMavenTwoProjectRPC( url, projectGroupId );
     }
 
+    public Map<String, Object> addMavenTwoProjectRPC( String url, int projectGroupId,
boolean checkoutInSingleDirectory )
+        throws Exception
+    {
+        return continuum.addMavenTwoProjectRPC( url, projectGroupId, checkoutInSingleDirectory
);
+    }
+
     public Map<String, Object> addProjectGroupRPC( String groupName, String groupId,
String description )
         throws Exception
     {

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=982247&r1=982246&r2=982247&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
Wed Aug  4 13:39:16 2010
@@ -44,6 +44,7 @@ import org.apache.continuum.xmlrpc.repos
 import org.apache.continuum.xmlrpc.repository.RepositoryPurgeConfiguration;
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.builddefinition.BuildDefinitionServiceException;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
 import org.apache.maven.continuum.installation.InstallationException;
 import org.apache.maven.continuum.profile.ProfileException;
@@ -750,6 +751,32 @@ public class ContinuumServiceImpl
         return populateAddingResult( result );
     }
 
+    public AddingResult addMavenTwoProject( String url, int projectGroupId, boolean checkoutInSingleDirectory
)
+        throws ContinuumException
+    {
+        checkAddProjectToGroupAuthorization( getProjectGroupName( projectGroupId ) );
+
+        ContinuumProjectBuildingResult result = null;
+        try
+        {
+            result =
+                continuum.addMavenTwoProject(
+                                              url,
+                                              projectGroupId,
+                                              true, // checkProtocol
+                                              false, // useCredentialsCache
+                                              true, // recursiveProjects
+                                              continuum.getBuildDefinitionService().getDefaultMavenTwoBuildDefinitionTemplate().getId(),
+                                              checkoutInSingleDirectory );
+        }
+        catch ( BuildDefinitionServiceException e )
+        {
+            throw new ContinuumException( e.getMessage(), e );
+        }
+
+        return populateAddingResult( result );
+    }
+
     // ----------------------------------------------------------------------
     // Maven 1.x projects
     // ----------------------------------------------------------------------
@@ -2322,6 +2349,12 @@ public class ContinuumServiceImpl
         return serializeObject( this.addMavenTwoProject( url, projectGroupId ) );
     }
 
+    public Map<String, Object> addMavenTwoProjectRPC( String url, int projectGroupId,
boolean checkoutInSingleDirectory )
+        throws Exception
+    {
+        return serializeObject( this.addMavenTwoProject( url, projectGroupId, checkoutInSingleDirectory
) );
+    }
+
     public Map<String, Object> addProjectGroupRPC( String groupName, String groupId,
String description )
         throws Exception
     {



Mime
View raw message