Camel
  1. Camel
  2. CAMEL-412

OSX mvn -e -o org.apache.camel:camel-maven-plugin:dot fails due to the lack of dot.exe

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.3.0
    • Fix Version/s: 1.4.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      OSX

    • Patch Info:
      Patch Available

      Description

      Though the intent seemed to be there, the DotMojo does not skip conversion of the file if there is no value for <executable/> in the pom.xml. The parameter was defaulted.

      #. removed the default.
      #. added log message.

        Issue Links

          Activity

          Hide
          james strachan added a comment -

          I've applied half of your patch - that if the executable property is empty or null then the generation is skipped.

          BTW its maybe an idea not to reformat the code before sending patches in the future, its kinda hard to see what you really did

          I'm not sure if we should remove the default executable name for DOT. Its up to users to use the plugin or not - you can also use maven profiles to only enable the plugin if its activated and so forth. So I like the idea of the plugin invoking "dot" on the path by default (as thats gonna work on most OSes).

          Maybe to disable the use of dot we can just use another property? I've added a useDot property so folks can disable the running of dot - would that do the trick?

          Show
          james strachan added a comment - I've applied half of your patch - that if the executable property is empty or null then the generation is skipped. BTW its maybe an idea not to reformat the code before sending patches in the future, its kinda hard to see what you really did I'm not sure if we should remove the default executable name for DOT. Its up to users to use the plugin or not - you can also use maven profiles to only enable the plugin if its activated and so forth. So I like the idea of the plugin invoking "dot" on the path by default (as thats gonna work on most OSes). Maybe to disable the use of dot we can just use another property? I've added a useDot property so folks can disable the running of dot - would that do the trick?
          Hide
          Claus Ibsen added a comment -

          This ticket is a new solution to avoid using dot.exe (GraphicViz)

          Show
          Claus Ibsen added a comment - This ticket is a new solution to avoid using dot.exe (GraphicViz)
          Hide
          Claus Ibsen added a comment -

          Kevin have you seen the option to setup the executable at http://activemq.apache.org/camel/camel-dot-maven-goal.html
          where you can configure the DOT.exe to use (on windows).

          And if patch is meant to be include then please provide a patch that doesn't change the current code style in Camel.

          Show
          Claus Ibsen added a comment - Kevin have you seen the option to setup the executable at http://activemq.apache.org/camel/camel-dot-maven-goal.html where you can configure the DOT.exe to use (on windows). And if patch is meant to be include then please provide a patch that doesn't change the current code style in Camel.
          Hide
          Kevin Ross added a comment -

          Claus, I'm aware of how to set the executable, I mention this in the description of the issue. I don't want it to execute any dot program, I just want the dot file to be generated so that I can view in Graphviz for Mac. It will automatically render for me when I choose to view it.

          I think James has the right idea. If the doc page you referenced were updated to reflect the additional that James made, this could be resolved without further work or application of the patch.

          Show
          Kevin Ross added a comment - Claus, I'm aware of how to set the executable, I mention this in the description of the issue. I don't want it to execute any dot program, I just want the dot file to be generated so that I can view in Graphviz for Mac. It will automatically render for me when I choose to view it. I think James has the right idea. If the doc page you referenced were updated to reflect the additional that James made, this could be resolved without further work or application of the patch.
          Hide
          Claus Ibsen added a comment -

          James / Kevin

          How do you actually configued the new option useDot to eg set it to false?
          I am not a super maven wizard and have tried with

          mvn camel:dot
          Is what I used to start it

          -DuseDot=false
          <useDot>false</useDot> in the pom.xml in the configuration tag.

          But neither fails.

          Also in the source code
          runCamelEmbedded()
          it has hardcoded useDot to true

          mojo.setDotEnabled(true);

          Shouldn't it honor the useDot option instead so it should be
          mojo.setDotEnabled(useDot);

          Show
          Claus Ibsen added a comment - James / Kevin How do you actually configued the new option useDot to eg set it to false? I am not a super maven wizard and have tried with mvn camel:dot Is what I used to start it -DuseDot=false <useDot>false</useDot> in the pom.xml in the configuration tag. But neither fails. Also in the source code runCamelEmbedded() it has hardcoded useDot to true mojo.setDotEnabled(true); Shouldn't it honor the useDot option instead so it should be mojo.setDotEnabled(useDot);
          Hide
          james strachan added a comment -

          To show this in use I've disabled the dot invocation in examples/camel-example-spring-xquery

            <reporting>
              <plugins>
                <plugin>
                  <groupId>org.apache.camel</groupId>
                  <artifactId>camel-maven-plugin</artifactId>
                  <configuration>
                    <useDot>false</useDot>
                  </configuration>
                </plugin>
              </plugins>
            </reporting>
          
          Show
          james strachan added a comment - To show this in use I've disabled the dot invocation in examples/camel-example-spring-xquery <reporting> <plugins> <plugin> <groupId>org.apache.camel</groupId> <artifactId>camel-maven-plugin</artifactId> <configuration> <useDot> false </useDot> </configuration> </plugin> </plugins> </reporting>
          Hide
          Claus Ibsen added a comment -

          I updated the wiki with James example

          Show
          Claus Ibsen added a comment - I updated the wiki with James example
          Hide
          Claus Ibsen added a comment -

          Closing 1.4 issues

          Show
          Claus Ibsen added a comment - Closing 1.4 issues

            People

            • Assignee:
              Claus Ibsen
              Reporter:
              Kevin Ross
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development