| 1 | <?xml version="1.0"?> |
|---|
| 2 | <project name="bridgedb" default="dist" basedir="."> |
|---|
| 3 | |
|---|
| 4 | <property file="org.bridgedb/version.props"/> |
|---|
| 5 | <property name="svn.exec.svnversion" value="svnversion"/> |
|---|
| 6 | |
|---|
| 7 | <macrodef name="iterate"> |
|---|
| 8 | <attribute name="target"/> |
|---|
| 9 | <sequential> |
|---|
| 10 | <subant target="@{target}"> |
|---|
| 11 | <filelist dir="."> |
|---|
| 12 | <!-- NOTE: order is important! --> |
|---|
| 13 | <file name="org.bridgedb/build.xml"/> |
|---|
| 14 | <file name="org.bridgedb.bio/build.xml"/> |
|---|
| 15 | <file name="org.bridgedb.rdb/build.xml"/> |
|---|
| 16 | <file name="org.bridgedb.rdb.construct/build.xml"/> |
|---|
| 17 | <file name="org.bridgedb.tools.batchmapper/build.xml"/> |
|---|
| 18 | <file name="org.bridgedb.server/build.xml"/> |
|---|
| 19 | <file name="org.bridgedb.webservice.picr/build.xml"/> |
|---|
| 20 | <file name="org.bridgedb.webservice.cronos/build.xml"/> |
|---|
| 21 | <file name="org.bridgedb.webservice.synergizer/build.xml"/> |
|---|
| 22 | <file name="org.bridgedb.webservice.biomart/build.xml"/> |
|---|
| 23 | <file name="org.bridgedb.webservice.bridgerest/build.xml"/> |
|---|
| 24 | </filelist> |
|---|
| 25 | </subant> |
|---|
| 26 | </sequential> |
|---|
| 27 | </macrodef> |
|---|
| 28 | |
|---|
| 29 | <target name="build"> |
|---|
| 30 | <iterate target="dist"/> |
|---|
| 31 | </target> |
|---|
| 32 | |
|---|
| 33 | <target name="dist" depends="doc, build"> |
|---|
| 34 | <iterate target="dist"/> |
|---|
| 35 | |
|---|
| 36 | <property name="zipbase" value="bridgedb-${bridgedb.version}"/> |
|---|
| 37 | <zip destfile="${zipbase}.zip"> |
|---|
| 38 | <zipfileset dir="." prefix="bridgedb-${bridgedb.version}"> |
|---|
| 39 | <include name="batchmapper.sh"/> |
|---|
| 40 | <include name="batchmapper.bat"/> |
|---|
| 41 | <include name="start-server.sh"/> |
|---|
| 42 | <include name="dist/*.jar"/> |
|---|
| 43 | <include name="LICENSE-2.0.txt"/> |
|---|
| 44 | <include name="README.txt"/> |
|---|
| 45 | <include name="apidoc"/> |
|---|
| 46 | <include name="webservice/gdb.config.template"/> |
|---|
| 47 | <include name="webservice/contrib/bridgedb-example.pl"/> |
|---|
| 48 | <include name="webservice/contrib/bridgedb-example.py"/> |
|---|
| 49 | </zipfileset> |
|---|
| 50 | </zip> |
|---|
| 51 | <tar destfile="${zipbase}.tar.gz" compression="gzip"> |
|---|
| 52 | <zipfileset src="${zipbase}.zip"/> |
|---|
| 53 | </tar> |
|---|
| 54 | |
|---|
| 55 | <property name="zipbase2" value="bridgedb-${bridgedb.version}-src"/> |
|---|
| 56 | <zip destfile="${zipbase2}.zip"> |
|---|
| 57 | <zipfileset dir="." prefix="bridgedb-${bridgedb.version}-src"> |
|---|
| 58 | <include name="batchmapper.sh"/> |
|---|
| 59 | <include name="batchmapper.bat"/> |
|---|
| 60 | <include name="start-server.sh"/> |
|---|
| 61 | <include name="LICENSE-2.0.txt"/> |
|---|
| 62 | <include name="README.txt"/> |
|---|
| 63 | <include name="apidoc"/> |
|---|
| 64 | <include name="org.bridgedb/version.props"/> |
|---|
| 65 | <include name="**/build.xml"/> |
|---|
| 66 | <include name="org.bridgedb.webservice.biomart/src/org/bridgedb/webservice/biomart/util/filterconversion.txt"/> |
|---|
| 67 | <include name="resources/*"/> |
|---|
| 68 | <include name="**/*.java"/> |
|---|
| 69 | <include name="**/*.jar"/> |
|---|
| 70 | <include name="org.bridgedb.tools.benchmarking/*.txt"/> |
|---|
| 71 | <exclude name="dist/*.jar"/> |
|---|
| 72 | <include name="org.bridgedb.server/gdb.config.template"/> |
|---|
| 73 | <include name="org.bridgedb.server/contrib/bridgedb-example.pl"/> |
|---|
| 74 | <include name="org.bridgedb.server/contrib/bridgedb-example.py"/> |
|---|
| 75 | </zipfileset> |
|---|
| 76 | </zip> |
|---|
| 77 | <tar destfile="${zipbase2}.tar.gz" compression="gzip"> |
|---|
| 78 | <zipfileset src="${zipbase2}.zip"/> |
|---|
| 79 | </tar> |
|---|
| 80 | |
|---|
| 81 | </target> |
|---|
| 82 | |
|---|
| 83 | <target name="clean"> |
|---|
| 84 | <iterate target="clean"/> |
|---|
| 85 | <delete dir="apidoc"/> |
|---|
| 86 | </target> |
|---|
| 87 | |
|---|
| 88 | <target name="test"> |
|---|
| 89 | <iterate target="test"/> |
|---|
| 90 | </target> |
|---|
| 91 | |
|---|
| 92 | <target name="dist-clean"> |
|---|
| 93 | <iterate target="dist-clean"/> |
|---|
| 94 | <delete dir="apidoc"/> |
|---|
| 95 | <delete dir="dist"/> |
|---|
| 96 | </target> |
|---|
| 97 | |
|---|
| 98 | <target name="doc"> |
|---|
| 99 | <mkdir dir="apidoc"/> |
|---|
| 100 | <tstamp /> <!-- set ${TODAY} and ${TSTAMP} --> |
|---|
| 101 | <exec executable="${svn.exec.svnversion}" outputproperty="subversion_revision" failifexecutionfails="false"> |
|---|
| 102 | <arg line="-n ."/> |
|---|
| 103 | </exec> |
|---|
| 104 | <javadoc destdir="apidoc" |
|---|
| 105 | doctitle="BridgeDb" |
|---|
| 106 | header="Revision ${subversion_revision}" |
|---|
| 107 | footer="Generated ${TODAY}"> |
|---|
| 108 | <package name="org.bridgedb"/> |
|---|
| 109 | <package name="org.bridgedb.bio"/> |
|---|
| 110 | <package name="org.bridgedb.file"/> |
|---|
| 111 | <package name="org.bridgedb.rdb"/> |
|---|
| 112 | <package name="org.bridgedb.webservice"/> |
|---|
| 113 | <package name="org.bridgedb.webservice.biomart"/> |
|---|
| 114 | <sourcepath> |
|---|
| 115 | <pathelement location="org.bridgedb/src"/> |
|---|
| 116 | <pathelement location="org.bridgedb.bio/src"/> |
|---|
| 117 | </sourcepath> |
|---|
| 118 | </javadoc> |
|---|
| 119 | </target> |
|---|
| 120 | |
|---|
| 121 | </project> |
|---|