root/trunk/bio/build.xml @ 221

Revision 221, 1.9 KB (checked in by martijn, 11 months ago)

Created test target for all modules

Line 
1<?xml version="1.0"?>
2<project name="BridgeDb-Bio" default="dist" basedir=".">
3
4  <!-- always be java 1.5 compatible -->
5  <property name="ant.build.javac.target" value="1.5"/>
6  <property name="ant.build.javac.source" value="1.5"/>
7       
8  <property name="jar.name" value="../dist/bridgedb-bio.jar"/>
9 
10  <target name="prepare">
11        <mkdir dir="build"/>
12  </target>
13
14        <path id="class.path">
15                <pathelement location="../dist/bridgedb.jar"/>
16        </path>
17
18  <target name="build" depends="prepare">
19        <javac srcdir="src"
20                   includes="**"
21                   debug="true"
22                   destdir="build">
23                   <classpath refid="class.path"/>
24        </javac>
25    <copy file="../resources/datasources.txt"
26          todir="build/org/bridgedb/bio" />
27    <copy file="../resources/organisms.txt"
28          todir="build/org/bridgedb/bio" />
29  </target>
30 
31  <target name="jar" depends="build">
32        <jar jarfile="${jar.name}">
33          <manifest>
34                <attribute name="Class-Path" value="derby.jar bridgedb.jar"/>
35          </manifest>
36          <fileset dir="build"/>
37          <fileset dir="src" includes="**/*.properties"/>
38        </jar>
39  </target>
40
41  <target name="dist" depends="jar"/>
42
43  <target name="clean">
44        <delete dir="build"/>
45  </target>
46
47  <target name="dist-clean" depends="clean">
48        <delete file="${jar.name}"/>
49  </target>
50
51        <target name="test" depends="build">
52                <path id="test.classpath">
53                        <path refid="class.path"/>
54                        <pathelement location="build"/>
55                        <pathelement location="../corelib/lib/derby.jar"/>
56                        <pathelement location="../corelib/build-lib/junit.jar"/>
57                </path>
58                <javac srcdir="test" debug="true"
59                                        includes="**"
60                                        destdir="build"
61                                        source="1.5">
62                        <classpath refid="test.classpath"/>
63                </javac>               
64                <junit printsummary="on" haltonfailure="true" fork="true">
65                        <formatter type="brief" usefile="false"/>
66                        <classpath refid="test.classpath"/>
67                        <batchtest>
68                                <fileset dir="test">
69                                        <include name="**/*Test*.java"/>
70                                </fileset>
71                        </batchtest>
72                </junit>
73        </target>
74
75</project>
Note: See TracBrowser for help on using the browser.