You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by pr...@apache.org on 2006/12/01 18:41:07 UTC
svn commit: r481315 -
/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/DeployModuleMojo.java
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() {