UMLGraph/build.xml

102 lines
3.4 KiB
XML

<project name="umlgraph" default="compile" basedir=".">
<description>
The specification for the Java-based umlgraph build processes.
$Id$
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="javadoc" location="javadoc"/>
<property name="lib" location="lib"/>
<property name="testsrc" location="test/src"/>
<property name="testout" location="${basedir}/testdata/dot-out"/>
<property name="testref" location="${basedir}/testdata/dot-ref"/>
<!-- import environment variables -->
<property environment="env"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${lib}"/>
<mkdir dir="testdata/dot-out"/>
<mkdir dir="${javadoc}"/>
</target>
<target name="version">
<echo>Version is ${VERSION}</echo>
<echo file="src/org/umlgraph/doclet/Version.java">/* Automatically generated file */
package org.umlgraph.doclet;
class Version { public static String VERSION = "${VERSION}";}
</echo>
</target>
<target name="compile" depends="init"
description="compile the source, build library " >
<javac srcdir="${src}" destdir="${build}" debug="true" deprecation="true" >
<compilerarg value="-Xlint"/>
</javac>
<jar basedir="${build}" destfile="${lib}/UmlGraph.jar" includes="org/umlgraph/doclet/*.class">
<manifest>
<attribute name="Main-Class" value="org.umlgraph.doclet.UmlGraph"/>
<attribute name="Class-Path" value="tools.jar"/>
</manifest>
</jar>
</target>
<target name="test" depends="compile"
description="run the regression tests" >
<java classname="org.umlgraph.test.BasicTest" fork="true">
<classpath>
<pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
<pathelement location="${build}"/>
<pathelement location="${lib}/UmlGraph.jar"/>
</classpath>
</java>
<java classname="org.umlgraph.test.UmlDocTest" fork="true">
<classpath>
<pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
<pathelement location="${build}"/>
<pathelement location="${lib}/UmlGraph.jar"/>
</classpath>
</java>
<apply executable="dot" dest="${testout}" parallel="false">
<arg value="-Tpng"/>
<arg value="-o"/>
<targetfile/>
<srcfile/>
<fileset dir="${testout}" includes="*.dot"/>
<mapper type="glob" from="*.dot" to="*.png"/>
</apply>
<apply executable="dot" dest="${testref}" parallel="false">
<arg value="-Tpng"/>
<arg value="-o"/>
<targetfile/>
<srcfile/>
<fileset dir="${testref}" includes="*.dot"/>
<mapper type="glob" from="*.dot" to="*.png"/>
</apply>
</target>
<target name="javadocs" depends="compile">
<javadoc sourcepath="${src}" packagenames="org.umlgraph.doclet.*" destdir="${javadoc}" private="true">
<doclet name="org.umlgraph.doclet.UmlGraphDoc" path="${lib}/UmlGraph.jar">
<param name="-inferrel"/>
<param name="-inferdep"/>
<param name="-collapsible"/>
<param name="-hide" value="java.*"/>
<param name="-collpackages" value="java.util.*"/>
<param name="-qualify"/>
<param name="-postfixpackage"/>
<param name="-nodefontsize" value="9"/>
<param name="-nodefontpackagesize" value="7"/>
<param name="-link" value="http://docs.oracle.com/javase/7/docs/jdk/api/javadoc/doclet/"/>
<param name="-link" value="http://download.oracle.com/javase/7/docs/api/"/>
</doclet>
</javadoc>
</target>
</project>