1 <project name="bnac-common" default="dist" basedir=".">
6 <property name="src" location="src"/>
7 <property name="data" location="data"/>
8 <property name="etc" location="etc"/>
9 <property name="doc" location="doc"/>
10 <property name="test.src" value="test-src"/>
12 <property name="lib" location="lib"/>
13 <property name="build" location="build"/>
14 <property name="dist" location="dist"/>
15 <property name="test.build" value="test-build"/>
17 <path id="class.path">
18 <pathelement path="${classpath}"/>
19 <fileset dir="${lib}">
20 <include name="**/*.jar"/>
26 <mkdir dir="${build}"/>
27 <mkdir dir="${dist}"/>
28 <mkdir dir="${test.build}"/>
31 <target name="build" depends="init" description="Compile code">
32 <javac srcdir="${src}" destdir="${build}" deprecation="on"
33 includeantruntime="false" debug="on">
34 <compilerarg value="-Xlint:unchecked"/>
36 <path refid="class.path"/>
39 <copy todir="${build}/cl/uchile/dcc/fcanas/bnac/data">
40 <fileset dir="${data}" excludes="**/*.swp"/>
44 <target name="dist" depends="build" description="Generate JAR file">
45 <mkdir dir="${dist}"/>
46 <jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build}"
47 manifest="${etc}/Manifest"/>
50 <target name="clean" description="Clean up" >
51 <delete includeemptydirs="true">
52 <fileset dir="${build}" includes="**/*"/>
53 <fileset dir="${dist}" includes="${ant.project.name}.jar"/>
57 <target name="test" depends="build" description="Compile test code">
58 <javac srcdir="${test.src}" destdir="${test.build}" deprecation="on"
59 includeantruntime="false" debug="on">
60 <compilerarg value="-Xlint:unchecked"/>
62 <path refid="class.path"/>
67 <target name="doc" description="Generate documentation">
68 <javadoc destdir="${doc}/javadoc"
69 author="true" version="true" use="true">
70 <fileset dir="${src}" defaultexcludes="yes">
71 <include name="**/*.java"/>