mirror of https://github.com/dspinellis/UMLGraph
90 lines
3.2 KiB
XML
90 lines
3.2 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/gr/spinellis/umlgraph/doclet/Version.java">/* Automatically generated file */
|
|
package gr.spinellis.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" excludes="gr/spinellis/umlgraph/doclet/RCS/*,gr/spinellis/umlgraph/test/RCS/*"/>
|
|
<jar basedir="${build}" destfile="${lib}/UmlGraph.jar" includes="gr/spinellis/umlgraph/doclet/*.class"/>
|
|
</target>
|
|
|
|
<target name="test" depends="compile"
|
|
description="run the regression tests" >
|
|
<java classname="gr.spinellis.umlgraph.test.BasicTest" 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="gr.spinellis.umlgraph.doclet.*" destdir="${javadoc}" package="true"/>
|
|
<property name="outFolder" location="${javadoc}/gr/spinellis/umlgraph/doclet"/>
|
|
<property name="dotName" value="umlgraph.dot"/>
|
|
<property name="dotFile" location="${outFolder}/${dotName}"/>
|
|
<property name="gifFile" location="${javadoc}/gr/spinellis/umlgraph/doclet/umlgraph.gif"/>
|
|
<javadoc sourcepath="${src}" packagenames="gr.spinellis.umlgraph.doclet.*" package="true">
|
|
<doclet name="gr.spinellis.umlgraph.doclet.UmlGraph" path="${lib}/UMLGraph.jar">
|
|
<param name="-d" value="${outFolder}"/>
|
|
<param name="-output" value="${dotName}"/>
|
|
<param name="-operations"/>
|
|
</doclet>
|
|
</javadoc>
|
|
<exec executable="dot">
|
|
<arg value="-Tgif"/>
|
|
<arg value="-o${gifFile}"/>
|
|
<arg value="${dotFile}"/>
|
|
</exec>
|
|
</target>
|
|
|
|
</project>
|