POM: Check explicitly for /opt/local/bin/dot
See original GitHub issueCurrently when running mvn clean install
in the root directory of the project, I get something like this:
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.241 sec - in org.sahli.asciidoc.confluence.publisher.converter.FolderBasedAsciidocPagesStructureProviderTest
Running org.sahli.asciidoc.confluence.publisher.converter.AsciidocConfluenceConverterTest
java.io.IOException: Cannot run program "/opt/local/bin/dot": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.startThreads(ProcessRunner.java:158)
at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.runJob(ProcessRunner.java:118)
at net.sourceforge.plantuml.api.TimeoutExecutor$MyThread.run(TimeoutExecutor.java:74)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 4 more
java.io.IOException: Cannot run program "/opt/local/bin/dot": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.startThreads(ProcessRunner.java:158)
at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.runJob(ProcessRunner.java:118)
at net.sourceforge.plantuml.api.TimeoutExecutor$MyThread.run(TimeoutExecutor.java:74)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 4 more
Suggestion: Check for the existence of that tool explicitly in the POM, and fail fast when it does not exist, explaining why the tool is needed, and suggest how to install it.
E.g. on macOS, the instruction could be:
- install Homebrew
brew install graphviz
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Introduction to the Build Lifecycle - Apache Maven
This command executes each default lifecycle phase in order ( validate , compile , package , etc.), before executing verify . You only...
Read more >How do I tell Maven to use the latest version of a dependency?
I have written such a tool in the the lowly language that is Bash. The script will update the versions like the version...
Read more >Maven dependencies | IntelliJ IDEA Documentation - JetBrains
Open your POM file. Specify the annotationProcessors and annotationProcessorPaths options. For example, check the following code:.
Read more >Spring with Maven BOM - Baeldung
For more details about Maven, you can check our article Apache Maven ... we should add it explicitly as a dependency in the...
Read more >Dependency Management — Dataverse.org
Do special tests on every build to verify these explicit combinations work. Managing transitive dependencies in pom.xml. Maven can manage versions of transitive ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When I started working with the project – that was the same issue I’ve faced 😄 I suppose (since this such a common issue), that the tests instead of failing with
Cannot run program "/opt/local/bin/dot"
should be failing with something more descriptive like “Please install GraphViz package to run these tests. See more info at: link to contributing guide”.Hi @znerd, as I see your point (but was not very happy with the pom-based approach with the hardcoded path), I tried another approach using a JUnit class rule based on the actual PlantUML lookup mechanism. It is available on branch
feature/graphviz-installation-check
and should be on master soon.The main issue I see with not doing anything for this issue is that the tests fail, but only due to different image dimensions as PlantUML is rendering the error message as an image (maybe not exactly the type of error handling we would expect …).
I was also checking for a way to actually detect the issue when converting the Asciidoc content (that would help during production usage, too), but so far was not able to find a hook to get into the PlantUML conversion process through JRuby.