You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2007/08/16 17:56:10 UTC
svn commit: r566753 -
/activemq/camel/trunk/tooling/maven/maven-html-to-pdf/src/main/java/org/apache/camel/maven/ConfluenceToPDFMojo.java
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);
+ }
}
}