Licence added to files.
[bnac-common.git] / build.xml
blob337c9647b58172e9defac96ba16c337e97cdf287
1 <project name="bnac-common" default="dist" basedir=".">
2     <description>
3         Common bnac library
4     </description>
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"/>
21         </fileset>
22     </path>
24     <target name="init">
25         <tstamp/>
26         <mkdir dir="${build}"/>
27         <mkdir dir="${dist}"/>
28         <mkdir dir="${test.build}"/>
29     </target>
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"/>
35             <classpath>
36                 <path refid="class.path"/>
37             </classpath>
38         </javac>
39         <copy todir="${build}/cl/uchile/dcc/fcanas/bnac/data">
40             <fileset dir="${data}" excludes="**/*.swp"/>
41         </copy>
42     </target>
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"/>
48     </target>
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"/>
54         </delete>
55     </target>
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"/>
61             <classpath>
62                 <path refid="class.path"/>
63             </classpath>
64         </javac>
65     </target>
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"/>
72             </fileset>
73         </javadoc>
74     </target>
75 </project>