camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r566753 - /activemq/camel/trunk/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/ConfluenceToPDFMojo.java
Date Thu, 16 Aug 2007 15:56:10 GMT
Author: jstrachan
Date: Thu Aug 16 08:56:09 2007
New Revision: 566753

URL: http://svn.apache.org/viewvc?view=rev&rev=566753
Log:
avoided the build failing if the prince executable is not configured or installed properly

Modified:
    activemq/camel/trunk/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/ConfluenceToPDFMojo.java

Modified: activemq/camel/trunk/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/ConfluenceToPDFMojo.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/ConfluenceToPDFMojo.java?view=diff&rev=566753&r1=566752&r2=566753
==============================================================================
--- activemq/camel/trunk/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/ConfluenceToPDFMojo.java
(original)
+++ activemq/camel/trunk/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/ConfluenceToPDFMojo.java
Thu Aug 16 08:56:09 2007
@@ -104,6 +104,13 @@
      */
     private String[] princeArgs;
 
+    /**
+     * Whether the build should fail if the prince executable cannot be ran correctly
+     *
+     * @parameter default-value="false"
+     */
+    private boolean failOnCommandLineError;
+
     public void execute() throws MojoExecutionException {
         File outputDir = new File(pdf).getParentFile();
         if (!outputDir.exists()) {
@@ -156,7 +163,11 @@
         if (rc == 0) {
             getLog().info("Stored: " + getPDFFileName());
         } else {
-            throw new MojoExecutionException("PDF Conversion failed rc=" + rc);
+            if (failOnCommandLineError) {
+                throw new MojoExecutionException("PDF Conversion failed rc=" + rc);
+            } else {
+                getLog().warn("Failed due to return code: " + rc);
+            }
         }
     }
 



Mime
View raw message