build.xml
file:
<project name="OwnTaskExample" default="main" basedir=".">
<!-- task definition -->
<taskdef name="plantuml" classname="net.sourceforge.plantuml.ant.PlantUmlTask" classpath="plantuml.jar" />
<!-- process ./src files -->
<target name="main">
<plantuml dir="./src" />
</target>
</project>
The Ant task processes all .c, .h, .cpp, .tex, .html, .htm or .java of the provided directory (
./src
in this example). It looks for @startXYZ
and generates .png
images.
output
tag.
<!-- Put images in c:/images directory -->
<target name="main">
<plantuml dir="./src" output="c:/images" />
</target>
c:/src
and subdirectories, (except files ending by Test.java
), and generate images into d:/images
, you can use:
<target name="main">
<plantuml output="d:/images" >
<fileset dir="c:/src">
<include name="**/*.java" />
<exclude name="**/*Test.java" />
</fileset>
</plantuml>
</target>
format="svg"
or format="eps"
in the Ant task definition.
<target name="main">
<plantuml dir="./src" format="svg" />
</target>
<target name="main">
<plantuml dir="./src" config="./config.cfg" />
</target>
Parameter | Default | Description |
nbthread | 1 | Number of thread for processing |
graphvizDot | Path of the dot executable | |
format | png | Format for image generation: xmi, xmi:argo, xmi:start, eps, svg, txt, utxt |
verbose |
false
|
true for more logs
|
config | File config to include before all diagrams | |
charset | Charset to use when reading files | |
output | Output directory for generated images | |
dir |
Input directory to process (You can use <fileset>/<filelist> instead)
|
|
failonerror |
false
|
true to fail the build if some syntax error occurs
|
checkonly |
false
|
true if you want to only check the syntax of files without generating images
|
overwrite |
false
|
true if you want overwrite read-only files
|
enablestats |
false
|
true to enable statistics
|
htmlstats |
false
|
true to output general statistics in file plantuml-stats.html
|
xmlstats |
false
|
true to output general statistics in file plantuml-stats.xml
|
realtimestats |
false
|
true to generate statistics on the fly rather than at the end
|