-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
executable file
·81 lines (68 loc) · 2.77 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<project name="snpindxer" default="jar" basedir=".">
<!-- To get maven to download the deps run the following command:
mvn dependency:copy-dependencies -DoutputDirectory=lib
-->
<description>
snpindexer build file
</description>
<property name="src" location="src"/>
<property name="lib" location="lib"/>
<property name="snpdatamodel.dir" location="../snpdatamodel/dist"/>
<property name="unittestoutput.dir" location="unittest-results" />
<property environment="env"/>
<path id="build.classpath">
<fileset dir="lib" excludes="*.checksum">
<include name="**/*.jar"/>
</fileset>
<fileset includes="snpdatamodel.jar" dir="${snpdatamodel.dir}" />
</path>
<target name="dependencies">
<exec executable="mvn">
<arg value="dependency:copy-dependencies"/>
<arg value="-DoutputDirectory=lib"/>
</exec>
</target>
<target name="init">
<mkdir dir="build"/>
<mkdir dir="dist"/>
</target>
<target name="clean" description="clean up" >
<delete dir="build"/>
<delete dir="dist/snpindexer.jar"/>
<delete dir="target"/>
<delete dir="${unittestoutput.dir}"/>
</target>
<!-- compile -->
<target name="compile" depends="clean, init" >
<javac debug="on" srcdir="src" destdir="build" classpathref="build.classpath" includeantruntime="false" />
</target>
<target name="unittest" depends="compile">
<echo>Running unit tests, output should be in ${unittestoutput.dir}</echo>
<mkdir dir="${unittestoutput.dir}"/>
<junit fork="yes" forkmode="once" failureproperty="junit.failure" printsummary="yes" >
<classpath>
<path refid="build.classpath" />
</classpath>
<formatter type="xml" usefile="true" />
<batchtest todir="${unittestoutput.dir}">
<fileset dir="build" includes="unittest/**/*Test.class" />
</batchtest>
</junit>
<fail message="Test failure detected, check test results." if="junit.failure" />
</target>
<target name="jar" depends="unittest" description="Generates a jar.">
<copy file="conf/log4j.properties" tofile="build/log4j.properties" overwrite="true" />
<copy file="conf/config.properties" tofile="build/config.properties" failonerror="false" overwrite="true" />
<copy file="${snpdatamodel.dir}/snpdatamodel.jar" todir="lib" overwrite="true" />
<jar jarfile="dist/snpindexer.jar" basedir="build" excludes="**/*Test.class">
<zipgroupfileset dir="lib" excludes="**/*.checksum"/>
<!-- <metainf dir="src/main/java/META-INF" includes="*.xml"/> -->
<manifest>
<attribute name="Main-Class" value="org.jax.mgi.snpindexer.Main" />
</manifest>
</jar>
</target>
<target name="run">
<!-- $JAVA_HOME/bin/java -DPG_DBURL=jdbc:postgresql://mgi-testdb3.jax.org/export -DPG_DBUSER=mgd_dbo -DPG_DBPASS=db0dev -DSOLR_BASEURL=http://mgi-testapp3.jax.org:8983/solr -jar snpindexer.jar ConsensusSNPIndex -->
</target>
</project>