| 1 | <?xml version="1.0"?> |
|---|
| 2 | <project name="org.bridgedb.webservice.synergizer" 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/org.bridgedb.webservice.synergizer.jar"/> |
|---|
| 9 | |
|---|
| 10 | <target name="prepare"> |
|---|
| 11 | <mkdir dir="build"/> |
|---|
| 12 | </target> |
|---|
| 13 | |
|---|
| 14 | <path id="dependencies"> |
|---|
| 15 | <fileset dir="lib"> |
|---|
| 16 | <include name="*.jar"/> |
|---|
| 17 | </fileset> |
|---|
| 18 | </path> |
|---|
| 19 | |
|---|
| 20 | <path id="class.path"> |
|---|
| 21 | <path refid="dependencies"/> |
|---|
| 22 | <fileset dir="../dist"> |
|---|
| 23 | <include name="org.bridgedb.jar"/> |
|---|
| 24 | </fileset> |
|---|
| 25 | </path> |
|---|
| 26 | |
|---|
| 27 | <target name="build" depends="prepare"> |
|---|
| 28 | <javac srcdir="src" |
|---|
| 29 | includes="**" |
|---|
| 30 | debug="true" |
|---|
| 31 | destdir="build"> |
|---|
| 32 | <classpath refid="class.path"/> |
|---|
| 33 | </javac> |
|---|
| 34 | <copy toDir="../dist"><path refid="dependencies"/></copy> |
|---|
| 35 | </target> |
|---|
| 36 | |
|---|
| 37 | <target name="jar" depends="build"> |
|---|
| 38 | <jar jarfile="${jar.name}"> |
|---|
| 39 | <manifest> |
|---|
| 40 | <attribute name="Class-Path" value="bridgedb-bio.jar bridgedb.jar"/> |
|---|
| 41 | </manifest> |
|---|
| 42 | <fileset dir="build"/> |
|---|
| 43 | <fileset dir="src" includes="**/*.properties"/> |
|---|
| 44 | </jar> |
|---|
| 45 | </target> |
|---|
| 46 | |
|---|
| 47 | <target name="dist" depends="jar"/> |
|---|
| 48 | |
|---|
| 49 | <target name="clean"> |
|---|
| 50 | <delete dir="build"/> |
|---|
| 51 | </target> |
|---|
| 52 | |
|---|
| 53 | <target name="dist-clean" depends="clean"> |
|---|
| 54 | <delete file="${jar.name}"/> |
|---|
| 55 | </target> |
|---|
| 56 | |
|---|
| 57 | <target name="test" depends="build"> |
|---|
| 58 | <path id="test.classpath"> |
|---|
| 59 | <pathelement location="build"/> |
|---|
| 60 | <path refid="class.path"/> |
|---|
| 61 | <pathelement location="../org.bridgedb.rdb/lib/derby.jar"/> |
|---|
| 62 | <pathelement location="../org.bridgedb/build-lib/junit4.jar"/> |
|---|
| 63 | <pathelement location="../org.bridgedb/build-lib/measure.jar"/> |
|---|
| 64 | </path> |
|---|
| 65 | <javac srcdir="test" debug="true" |
|---|
| 66 | includes="**" |
|---|
| 67 | destdir="build" |
|---|
| 68 | source="1.5"> |
|---|
| 69 | <classpath refid="test.classpath"/> |
|---|
| 70 | </javac> |
|---|
| 71 | <junit printsummary="on" haltonfailure="true" fork="true"> |
|---|
| 72 | <formatter type="brief" usefile="false"/> |
|---|
| 73 | <classpath refid="test.classpath"/> |
|---|
| 74 | <batchtest> |
|---|
| 75 | <fileset dir="test"> |
|---|
| 76 | <include name="**/*Test*.java"/> |
|---|
| 77 | </fileset> |
|---|
| 78 | </batchtest> |
|---|
| 79 | </junit> |
|---|
| 80 | </target> |
|---|
| 81 | </project> |
|---|