forked from JULIELab/trec-pm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
48 lines (43 loc) · 2.31 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<project name="TrecPM" basedir=".">
<target name="create.lib.dir">
<mkdir dir="${project.build.directory}/lib"/>
</target>
<target name="test.if.nist.is.available">
<condition property="nist.available">
<socket server="https://trec.nist.gov/" port="443"/>
</condition>
</target>
<target name="test.if.trec.eval.is.available">
<available file="${project.build.directory}/lib/trec_eval" property="trec.eval.available"/>
</target>
<target name="test.if.gene.info.is.available">
<available file="${basedir}/src/main/resources/genes/Homo_sapiens.gene_info" property="gene.info.available"/>
</target>
<target name="build.trec.eval.patch" unless="trec.eval.available">
<get src="https://github.com/usnistgov/trec_eval/archive/v9.0.6.zip"
dest="${project.build.directory}/lib/trec_eval-9.0.6.zip"
verbose="false" usetimestamp="true"/>
<unzip src="${project.build.directory}/lib/trec_eval-9.0.6.zip"
dest="${project.build.directory}/lib/"/>
<exec executable="make" failonerror="true"
dir="${project.build.directory}/lib/trec_eval-9.0.6/"/>
<move file="${project.build.directory}/lib/trec_eval-9.0.6/trec_eval"
tofile="${project.build.directory}/lib/trec_eval"/>
</target>
<target name="get.trec.sample.eval" if="script.available">
<get src="https://trec.nist.gov/data/clinical/sample_eval.pl"
dest="${project.build.directory}/lib/sample_eval.pl"
verbose="false" usetimestamp="true"/>
</target>
<target name="get.trec.sample.fallback" unless="nist.available">
<get src="file:${basedir}/resources/sample_eval.pl"
dest="${project.build.directory}/lib/sample_eval.pl"
verbose="false" usetimestamp="false"/>
</target>
<target name="get.gene.info" unless="gene.info.available">
<gunzip src="${basedir}/resources/Homo_sapiens.gene_info.gz"
dest="${basedir}/src/main/resources/genes/Homo_sapiens.gene_info"/>
</target>
<target name="go"
depends="create.lib.dir, test.if.nist.is.available, test.if.trec.eval.is.available, test.if.gene.info.is.available, build.trec.eval.patch, get.trec.sample.eval, get.trec.sample.fallback, get.gene.info"/>
</project>