incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r578708 - /incubator/sling/trunk/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java
Date Mon, 24 Sep 2007 08:38:10 GMT
Author: fmeschbe
Date: Mon Sep 24 01:38:09 2007
New Revision: 578708

URL: http://svn.apache.org/viewvc?rev=578708&view=rev
Log:
Fail project build if installation fails

Modified:
    incubator/sling/trunk/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java

Modified: incubator/sling/trunk/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java?rev=578708&r1=578707&r2=578708&view=diff
==============================================================================
--- incubator/sling/trunk/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java
(original)
+++ incubator/sling/trunk/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java
Mon Sep 24 01:38:09 2007
@@ -98,7 +98,7 @@
         post(slingUrl, bundleFile);
     }
 
-    protected void post(String targetURL, File file) {
+    protected void post(String targetURL, File file) throws MojoExecutionException {
     
         // append pseudo path after root URL to not get redirected for nothing
         PostMethod filePost = new PostMethod(targetURL + "/install");
@@ -135,12 +135,8 @@
                 getLog().error(
                     "Installation failed, cause: " + HttpStatus.getStatusText(status));
             }
-        } catch (ConnectException ce) {
-            getLog().info("Installation on " + targetURL + " failed, cause: " + ce.getMessage());
-            getLog().debug(ce); // dump on debug
         } catch (Exception ex) {
-            getLog().error(ex.getClass().getName() + " " + ex.getMessage());
-            ex.printStackTrace();
+            throw new MojoExecutionException("Installation on " + targetURL + " failed, cause:
" + ex.getMessage(), ex);
         } finally {
             filePost.releaseConnection();
         }



Mime
View raw message