continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r648029 - /continuum/trunk/maven-continuum-plugin/src/main/java/org/apache/maven/continuum/plugin/AddMavenTwoProject.java
Date Mon, 14 Apr 2008 22:07:06 GMT
Author: olamy
Date: Mon Apr 14 15:06:46 2008
New Revision: 648029

URL: http://svn.apache.org/viewvc?rev=648029&view=rev
Log:
[CONTINUUM-1672] continuum plugin doesn't fails to add maven two projects


Modified:
    continuum/trunk/maven-continuum-plugin/src/main/java/org/apache/maven/continuum/plugin/AddMavenTwoProject.java

Modified: continuum/trunk/maven-continuum-plugin/src/main/java/org/apache/maven/continuum/plugin/AddMavenTwoProject.java
URL: http://svn.apache.org/viewvc/continuum/trunk/maven-continuum-plugin/src/main/java/org/apache/maven/continuum/plugin/AddMavenTwoProject.java?rev=648029&r1=648028&r2=648029&view=diff
==============================================================================
--- continuum/trunk/maven-continuum-plugin/src/main/java/org/apache/maven/continuum/plugin/AddMavenTwoProject.java
(original)
+++ continuum/trunk/maven-continuum-plugin/src/main/java/org/apache/maven/continuum/plugin/AddMavenTwoProject.java
Mon Apr 14 15:06:46 2008
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.maven.continuum.xmlrpc.project.AddingResult;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 
@@ -50,16 +51,27 @@
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
+        AddingResult addingResult = null;
         try
         {
+
             if ( projectGroupId != null && projectGroupId.length() > 0 )
             {
-                getClient().addMavenTwoProject( projectUrl, Integer.parseInt( projectGroupId
) );
+                addingResult = getClient().addMavenTwoProject( projectUrl, Integer.parseInt(
projectGroupId ) );
             }
             else
             {
-                getClient().addMavenTwoProject( projectUrl );
+                addingResult = getClient().addMavenTwoProject( projectUrl );
+            }
+            if ( addingResult.getErrorsAsString() != null )
+            {
+                getLog().error( "fail to add mavenTwo project " + addingResult.getErrorsAsString()
);
+                throw new MojoExecutionException( "fail to add mavenTwo project " + addingResult.getErrorsAsString()
);
             }
+        }
+        catch ( MojoExecutionException e )
+        {
+            throw e;
         }
         catch ( Exception e )
         {



Mime
View raw message