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" location="test"/>
12 <property name="lib" location="lib"/>
13 <property name="build" location="build"/>
14 <property name="dist" location="dist"/>
16 <path id="class.path">
17 <pathelement path="${classpath}"/>
18 <fileset dir="${lib}">
19 <include name="**/*.jar"/>
25 <mkdir dir="${build}"/>
26 <mkdir dir="${dist}"/>
27 <mkdir dir="${test}/build"/>
30 <target name="build" depends="init" description="Compile code">
31 <javac srcdir="${src}" destdir="${build}" deprecation="on"
32 includeantruntime="false" debug="on">
33 <compilerarg value="-Xlint:unchecked"/>
35 <path refid="class.path"/>
38 <copy todir="${build}/cl/uchile/dcc/fcanas/bnac/data">
39 <fileset dir="${data}" excludes="**/*.swp"/>
43 <target name="dist" depends="build" description="Generate JAR file">
44 <mkdir dir="${dist}"/>
45 <jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build}"
46 manifest="${etc}/Manifest"/>
49 <target name="clean" description="Clean up" >
50 <delete includeemptydirs="true">
51 <fileset dir="${build}" includes="**/*"/>
52 <fileset dir="${dist}" includes="${ant.project.name}.jar"/>
56 <target name="test" depends="build" description="Compile test code">
57 <javac srcdir="${test}/src" destdir="${test}/build"
58 deprecation="on" includeantruntime="false" debug="on">
59 <compilerarg value="-Xlint:unchecked"/>
61 <path refid="class.path"/>
62 <pathelement location="${dist}/${ant.project.name}.jar"/>
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"/>