geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pra...@apache.org
Subject svn commit: r481315 - /geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/DeployModuleMojo.java
Date Fri, 01 Dec 2006 17:41:07 GMT
Author: prasad
Date: Fri Dec  1 09:41:06 2006
New Revision: 481315

URL: http://svn.apache.org/viewvc?view=rev&rev=481315
Log:
* if module already exists, don't throw an exception. This could use some more work on it.

Modified:
    geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/DeployModuleMojo.java

Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/DeployModuleMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/DeployModuleMojo.java?view=diff&rev=481315&r1=481314&r2=481315
==============================================================================
--- geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/DeployModuleMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/DeployModuleMojo.java
Fri Dec  1 09:41:06 2006
@@ -151,10 +151,17 @@
         DeploymentStatus status = waitFor(progress);
 
         if (status.isFailed()) {
-            throw new MojoExecutionException("Distribution failed: " + status.getMessage());
+            //
+            // FIXME: There must be a better way to handle this.
+            //
+            if (status.getMessage().indexOf("already exists") < 0 ) {
+                throw new MojoExecutionException("Distribution failed: " + status.getMessage());
+            }
+            log.info("Module already exists");
         }
+        
 
-        return progress.getResultTargetModuleIDs();
+        return (progress != null) ? progress.getResultTargetModuleIDs() : null;
     }
 
     protected String getFullClassName() {



Mime
View raw message