Running the Doclet from Ant

To run the UMLGraph doclet from ant, use a rule, like the following.
<target name="uml" depends="prepare">
       <property name="uml.dir" value="${basedir}/uml"/>
       <property name="src.uml.dir" value="${src.dir}/uml"/>
       <mkdir dir="${uml.dir}"/>
       <path id="uml.source.path">
           <pathelement path="${src.uml.dir}/"/>
           <pathelement path="${src.java.dir}"/>
         </path>
       <javadoc sourcepathref="uml.source.path" packagenames="*" package="true">
           <doclet name="org.umlgraph.doclet.UmlGraph" path="${basedir}/lib/UmlGraph.jar">
               <param name="-d" value="${uml.dir}"/>
           </doclet>
       </javadoc>
       <apply executable="dot" dest="${uml.dir}" parallel="false">
         <arg value="-Tpng"/>
         <arg value="-o"/>
         <targetfile/>
         <srcfile/>
         <fileset dir="${uml.dir}" includes="*.dot"/>
         <mapper type="glob" from="*.dot" to="*.png"/>
       </apply>
   </target>

Notes