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 2008/03/31 16:37:21 UTC

svn commit: r643006 - /activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java

Author: jstrachan
Date: Mon Mar 31 07:37:14 2008
New Revision: 643006

URL: http://svn.apache.org/viewvc?rev=643006&view=rev
Log:
added flat to enable/disable the use of the DOT executable

Modified:
    activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java

Modified: activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java?rev=643006&r1=643005&r2=643006&view=diff
==============================================================================
--- activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java (original)
+++ activemq/camel/trunk/tooling/maven/camel-maven-plugin/src/main/java/org/apache/camel/maven/DotMojo.java Mon Mar 31 07:37:14 2008
@@ -82,6 +82,13 @@
      */
     protected boolean runCamel;
     /**
+     * Should we try run the DOT executable on the generated .DOT file to generate images
+     *
+     * @parameter expression="true"
+     * @readonly
+     */
+    protected boolean useDot;
+    /**
      * Reference to Maven 2 Project.
      *
      * @parameter expression="${project}"
@@ -240,7 +247,7 @@
                     String format = graphvizOutputTypes[j];
                     String generated = convertFile(file, format);
 
-                    if (format.equals("cmapx")) {
+                    if (generated != null && format.equals("cmapx")) {
                         // lets include the generated file inside the html
                         addFileToBuffer(out, new File(generated));
                     }
@@ -378,8 +385,11 @@
 
     protected String convertFile(File file, String format) throws CommandLineException {
         Log log = getLog();
+        if (!useDot) {
+            log.info("DOT generation disabled");
+            return null;
+        }
         if (this.executable == null || this.executable.length() == 0) {
-
             log.warn( "Parameter <executable/> was not set in the pom.xml.  Skipping conversion." );
             return null;
         }