An example project that demonstrates how to integrate Asciidoctor Diagram with the Asciidoctor Maven plugin.
Convert the AsciiDoc to HTML5 by invoking the process-resources
goal (configured as the default goal):
$ mvn
Open the file target/generated-docs/example-manual.html in your browser to see the generated HTML file containing the generated diagram images.
Asciidoctor Diagram bundles both the ditaa and PlantUML libraries and will use them to generate diagrams. In order to generate diagrams using Graphviz, you must install it separately. There are two options to reference the installed Graphviz’s dot tool in order to generate diagrams: system’s PATH or plug-in attributes configuration.
Visit Graphviz' site for details on how to install the dot command tool, and to make the dot command available on your system’s PATH.
Once Graphviz binaries from the Graphviz' site are available on the system, the plug-in attributes in the pom.xml can be used to reference to the dot tool directly. This type of configuration may be especially useful when working in a CI environment. Example:
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
...
<configuration>
<attributes>
<graphvizdot>/PATH/TO/Graphviz/bin/dot</graphvizdot>
</attributes>
...
For more examples and information about Asciidoctor Diagrams see http://asciidoctor.org/news/2014/02/18/plain-text-diagrams-in-asciidoctor/