continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r985609 - 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 Sun, 15 Aug 2010 02:14:30 GMT
Author: oching
Date: Sun Aug 15 02:14:29 2010
New Revision: 985609

URL: http://svn.apache.org/viewvc?rev=985609&view=rev
Log:
[CONTINUUM-2562] add support for adding M2 projects non-recursively (instead of one Continuum
project per module) from web services

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=985609&r1=985608&r2=985609&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
Sun Aug 15 02:14:29 2010
@@ -737,6 +737,33 @@ public interface ContinuumService
     Map<String, Object> addMavenTwoProjectRPC( String url, int projectGroupId, boolean
checkoutInSingleDirectory )
         throws Exception;
 
+    /**
+     * Add a maven 2.x multi-module project from a url and add it to Continuum as a single
project instead of
+     * as multiple projects (one project per module).
+     *
+     * To add a multi-module project with its modules as separate Continuum projects,
+     * use ContinuumService#addMavenTwoProject( String url, int projectGroupId, boolean checkoutInSingleDirectory)
+     * instead.
+     *
+     * @param url
+     * @param projectGroupId
+     * @return
+     * @throws Exception
+     */
+    AddingResult addMavenTwoProjectAsSingleProject( String url, int projectGroupId )
+        throws Exception;
+
+    /**
+     * Same method but compatible with standard XMLRPC
+     * 
+     * @param url
+     * @param projectGroupId
+     * @return
+     * @throws Exception
+     */
+    Map<String,Object> addMavenTwoProjectAsSingleProjectRPC( String url, int projectGroupId
)
+        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=985609&r1=985608&r2=985609&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
Sun Aug 15 02:14:29 2010
@@ -398,6 +398,12 @@ public class ContinuumXmlRpcClient
         return continuum.addMavenTwoProject( url, projectGroupId, checkoutInSingleDirectory
);
     }
 
+    public AddingResult addMavenTwoProjectAsSingleProject( String url, int projectGroupId
)
+        throws Exception
+    {
+        return continuum.addMavenTwoProjectAsSingleProject( url, projectGroupId );
+    }
+
     // ----------------------------------------------------------------------
     // Maven 1.x projects
     // ----------------------------------------------------------------------
@@ -720,6 +726,12 @@ public class ContinuumXmlRpcClient
         return continuum.addMavenTwoProjectRPC( url, projectGroupId, checkoutInSingleDirectory
);
     }
 
+    public Map<String,Object> addMavenTwoProjectAsSingleProjectRPC( String url, int
projectGroupId )
+        throws Exception
+    {
+        return continuum.addMavenTwoProjectAsSingleProjectRPC( url, projectGroupId );
+    }
+
     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=985609&r1=985608&r2=985609&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
Sun Aug 15 02:14:29 2010
@@ -785,6 +785,34 @@ public class ContinuumServiceImpl
         return populateAddingResult( result );
     }
 
+    public AddingResult addMavenTwoProjectAsSingleProject( String url, int projectGroupId
)
+        throws Exception
+    {
+        checkAddProjectToGroupAuthorization( getProjectGroupName( projectGroupId ) );
+
+        ContinuumProjectBuildingResult result = null;
+        try
+        {
+            result =
+                continuum.addMavenTwoProject(
+                                              url,
+                                              projectGroupId,
+                                              true, // checkProtocol
+                                              false, // useCredentialsCache
+                                              false, // recursiveProjects
+                                              continuum.getBuildDefinitionService().getDefaultMavenTwoBuildDefinitionTemplate().getId(),
+                                              true );  // a multi-module project added as
a single project is always checked out
+                                                       // in a single directory, regardless
the value set for checkoutInSingleDirectory
+                                                       // variable
+        }
+        catch ( BuildDefinitionServiceException e )
+        {
+            throw new ContinuumException( e.getMessage(), e );
+        }
+
+        return populateAddingResult( result );
+    }
+
     // ----------------------------------------------------------------------
     // Maven 1.x projects
     // ----------------------------------------------------------------------
@@ -2387,6 +2415,12 @@ public class ContinuumServiceImpl
         return serializeObject( this.addMavenTwoProject( url, projectGroupId, checkoutInSingleDirectory
) );
     }
 
+    public Map<String,Object> addMavenTwoProjectAsSingleProjectRPC( String url, int
projectGroupId )
+        throws Exception
+    {
+        return serializeObject( this.addMavenTwoProjectAsSingleProject( url, projectGroupId
) );
+    }
+
     public Map<String, Object> addProjectGroupRPC( String groupName, String groupId,
String description )
         throws Exception
     {



Mime
View raw message