-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
136 lines (109 loc) · 4.49 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<project name="ESAT" default="build" basedir=".">
<!-- Properties-->
<!-- Source and lib directories -->
<property name="src.dir" value="${basedir}/src/" />
<property name="lib.dir" value="${basedir}/lib/" />
<!-- Distribution directory. Binary distribution is placed here -->
<property name="dist.dir" value="${basedir}/dist/" />
<!--<property name="dist.dir" value="/Volumes/seq_mgarber/" />-->
<property name="build.dir" value="${basedir}/build/"/>
<!--<property name="test.dir" JUnit tests go here" />-->
<property name="test.dir" location="${basedir}/test/"/>
<!-- build specific properties. These are normally set by Hudson during the build process -->
<property name="version" value="v0.1" />
<!-- All jar files in lib file -->
<path id="master-classpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<path id="test-classpath">
<fileset dir="${lib.dir}">
<include name="junit*.jar"/>
<include name="hamcrest*.jar"/>
</fileset>
<pathelement location="${test.dir}" />
<pathelement location="${build.dir}/main"/>
<pathelement location="${build.dir}/test"/>
</path>
<target name="init" >
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${build.dir}/test"/>
<tstamp>
<format property="timestamp" pattern="MM.dd.yy_kk.mm" />
</tstamp>
<property name="jar.name" value="esat.${version}_${timestamp}.jar" />
<property name="jar.path" value="${dist.dir}${jar.name}" />
<echo message="Version ${version}"/>
<echo message="jar to build: ${jar.name}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${src.dir}" debug="on" destdir="${build.dir}">
<classpath refid="master-classpath"/>
</javac>
<javac srcdir="${test.dir}" destdir="${build.dir}/test">
<classpath refid="test-classpath"/>
</javac>
</target>
<target name="unpack" depends="init">
<!-- Unzip jars to the tmp directory -->
<unzip dest="${build.dir}">
<patternset>
<include name="**/*"/>
<exclude name="META-INF/**"/>
</patternset>
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</unzip>
</target>
<target name="copy.props" depends="init">
<copy todir="${build.dir}" file ="${src.dir}log4j.properties"/>
</target>
<!-- build the esat jar-->
<target name="build" depends="compile, unpack, copy.props">
<jar destfile="${jar.path}" basedir="${build.dir}" compress="true">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Main-Class" value="umms.esat.NewESAT"/>
</manifest>
</jar>
</target>
<!-- build the barcode splitter jar-->
<target name="bcprocess" depends="compile, unpack, copy.props">
<jar destfile="${dist.dir}splitter_${timestamp}.jar" basedir="${build.dir}" compress="true">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Main-Class" value="umms.core.fastq.utils.BCProcessor"/>
</manifest>
</jar>
</target>
<!-- build the ribosat jar-->
<target name="ribosat" depends="compile, unpack, copy.props">
<jar destfile="${dist.dir}ribosat_${timestamp}.jar" basedir="${build.dir}" compress="true">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Main-Class" value="umms.ribosat.RIBOSAT"/>
</manifest>
</jar>
</target>
<!-- Run Tests -->
<target name="test" depends="build, ribosat, bcprocess">
<junit fork="yes" haltonfailure="true">
<classpath refid="test-classpath" />
<batchtest fork="yes" todir="tres">
<formatter type="brief" usefile="false"/>
<fileset dir="${test.dir}">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
</target>
<!-- Clean all generated artifacts -->
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
</target>
<target name="all" depends="clean, build"/>
</project>