<?xml version="1.0" encoding="UTF-8"?>
<project name="jcablib" default="jar" basedir=".">
<property name="src" location="src/java"/>
<property name="bin" location="bin"/>
<property name="build.tests" location="${bin}/test"/>
<property name="src.tests" location="src/test"/>
<property name="dist" location="dist"/>
<property name="lib" location="lib"/>
<property name="doc" location="docs"/>
<property name="test" location="${src}/net/sf/jcablib/test"/>
<property name="jarfile" location="${dist}/${ant.project.name}.jar"/>
<property name="compile.debug" value="true"/>
<fileset id="lib.jars" dir="${lib}">
<include name="**/*.jar"/>
</fileset>
<path id="lib.path">
<fileset refid="lib.jars"/>
</path>
<!-- Stub install target. Install should depend on the 'jar' target,
and copy the built objects to the 'dist' directory. -->
<target name="install" description="Install jar" depends="jar">
</target>
<target name="compile" description="Compile code">
<mkdir dir="${bin}"/>
<javac srcdir="${src}" destdir="${bin}"
source="1.5" target="1.5"
includeAntRuntime="no"
classpathref="lib.path" debug="${compile.debug}">
</javac>
</target>
<target name="jar" depends="compile" description="Build jar">
<mkdir dir="${dist}"/>
<jar jarfile="${jarfile}">
<fileset dir="${bin}">
<include name="net/sf/jcablib/**"/>
<exclude name="net/sf/jcablib/test/**"/>
</fileset>
<fileset dir="${src}">
<include name="net/sf/jcablib/**"/>
<exclude name="net/sf/jcablib/test/**"/>
</fileset>
<fileset dir=".">
<include name="*.txt"/>
</fileset>
</jar>
</target>
<target name="clean" description="Remove build and dist directories">
<delete dir="${bin}"/>
<delete dir="${dist}"/>
<delete dir="${doc}"/>
</target>
<target name="doc" description="">
<mkdir dir="${doc}"/>
<javadoc packagenames="net.sf.jcablib.*" sourcepath="${src}"
excludepackagenames="net.sf.jcablib.test.*"
defaultexcludes="yes" destdir="docs/api"
author="true" version="true" use="true"
windowtitle="Java Cabinet Library">
<tag name="todo" scope="all" description="To do:"/>
</javadoc>
</target>
<target name="run" depends="jar" description="Run command line tests">
</target>
<target name="test" depends="jar" description="Run JUnit tests">
<junit>
<test name="net.sf.jcablib.test.InterfaceMatch"/>
</junit>
</target>
</project>