graphviz:dot

Full name:

us.bryon:graphviz-maven-plugin:1.0:dot

Description:

use Graphviz to render .dot files to images. This mojo uses Graphviz to convert files in the "dot" file format. By default, this mojo assumes you have DOT files with the extension .dot in a directory in your maven project named src/main/dot - it will call out to the Graphviz binary and convert the files to PNG files and place them in target/graphviz, using the default "dot" layout for Graphviz. You can customize the source and target locations, the file format, or the layout by setting plugin configuration parameters.

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Binds by default to the lifecycle phase: generate-sources.

Required Parameters

Name Type Since Description
basedir File - the base directory in which .dot files can be found.
destdir File - destination directory into which rendered output will be written.
dot String - the graphviz binary to use. by default, it is assumed that "dot" is on your PATH - if not, this value should be set to the full path to the dot binary.
Default value is: dot.
includes String - pattern of files to include (separate multiple patterns with commas).
Default value is: **/*.dot.
layout String - layout to use. this can be any value that can be provided to the -K option of the graphviz binary - at time of writing this is dot|neato|twopi|circo|fdp|sfdp. see the man pages (http://www.graphviz.org/pdf/dot.1.pdf) for descriptions of the formats.
Default value is: dot.
output String - output format. this can be any value that can be provided to the -T option of the graphviz binary - the list of all known options is here: http://www.graphviz.org/doc/info/output.html. the set of options available on your maching may vary - run dot -T? for a list of output formats supported by your installation.
Default value is: png.

Optional Parameters

Name Type Since Description
excludes String - pattern of files to exclude (separate multiple patterns with commas).
mapper FileMapper - file mapper to use. provide a custom mapper used to transform input filenames into output - by default, the mapper used will be a FileExtensionMapper, using the value of output as the extension on the output file.

Parameter Details

basedir:

the base directory in which .dot files can be found.
  • Type: java.io.File
  • Required: Yes
  • Expression: ${project.basedir}/src/main/dot

destdir:

destination directory into which rendered output will be written.
  • Type: java.io.File
  • Required: Yes
  • Expression: ${project.build.directory}/graphviz

dot:

the graphviz binary to use. by default, it is assumed that "dot" is on your PATH - if not, this value should be set to the full path to the dot binary.
  • Type: java.lang.String
  • Required: Yes
  • Default: dot

excludes:

pattern of files to exclude (separate multiple patterns with commas).
  • Type: java.lang.String
  • Required: No

includes:

pattern of files to include (separate multiple patterns with commas).
  • Type: java.lang.String
  • Required: Yes
  • Default: **/*.dot

layout:

layout to use. this can be any value that can be provided to the -K option of the graphviz binary - at time of writing this is dot|neato|twopi|circo|fdp|sfdp. see the man pages (http://www.graphviz.org/pdf/dot.1.pdf) for descriptions of the formats.
  • Type: java.lang.String
  • Required: Yes
  • Default: dot

mapper:

file mapper to use. provide a custom mapper used to transform input filenames into output - by default, the mapper used will be a FileExtensionMapper, using the value of output as the extension on the output file.
  • Type: org.codehaus.plexus.components.io.filemappers.FileMapper
  • Required: No

output:

output format. this can be any value that can be provided to the -T option of the graphviz binary - the list of all known options is here: http://www.graphviz.org/doc/info/output.html. the set of options available on your maching may vary - run dot -T? for a list of output formats supported by your installation.
  • Type: java.lang.String
  • Required: Yes
  • Default: png