-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
247 lines (196 loc) · 8.99 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<?xml version="1.0" encoding="UTF-8"?>
<project name="biocode-fims" default="all">
<property name="jdk.home.1.6" value="/usr"/>
<!-- Compiler options -->
<property name="compiler.debug" value="on"/>
<property name="compiler.generate.no.warnings" value="off"/>
<property name="compiler.args" value=""/>
<property name="compiler.max.memory" value="128m"/>
<patternset id="ignored.files">
<exclude name="**/CVS/**"/>
<exclude name="**/SCCS/**"/>
<exclude name="**/RCS/**"/>
<exclude name="**/rcs/**"/>
<exclude name="**/.DS_Store/**"/>
<exclude name="**/.svn/**"/>
<exclude name="**/.pyc/**"/>
<exclude name="**/.pyo/**"/>
<exclude name="**/*.pyc/**"/>
<exclude name="**/*.pyo/**"/>
<exclude name="**/.git/**"/>
<exclude name="**/*.hprof/**"/>
<exclude name="**/_svn/**"/>
<exclude name="**/.hg/**"/>
</patternset>
<patternset id="library.patterns">
<include name="*.zip"/>
<include name="*.war"/>
<include name="*.egg"/>
<include name="*.ear"/>
<include name="*.swc"/>
<include name="*.jar"/>
</patternset>
<patternset id="compiler.resources">
<include name="**/?*.properties"/>
<include name="**/?*.xml"/>
<include name="**/?*.gif"/>
<include name="**/?*.png"/>
<include name="**/?*.jpeg"/>
<include name="**/?*.jpg"/>
<include name="**/?*.html"/>
<include name="**/?*.dtd"/>
<include name="**/?*.tld"/>
<include name="**/?*.ftl"/>
</patternset>
<!-- JDK definitions -->
<property name="jdk.bin.1.6" value="${jdk.home.1.6}/bin"/>
<path id="jdk.classpath.1.6">
</path>
<property name="expedition.jdk.home" value="${jdk.home.1.6}"/>
<property name="expedition.jdk.bin" value="${jdk.bin.1.6}"/>
<property name="expedition.jdk.classpath" value="jdk.classpath.1.6"/>
<!-- Expedition Libraries -->
<!-- BJS: instead of listing each JAR, switched this to use the "fileset" mechanism -->
<path id="library.lib.classpath">
<fileset dir="${basedir}/lib">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- Modules -->
<dirname property="module.biocode-fims.basedir" file="${ant.file}"/>
<property name="module.jdk.home.biocode-fims" value="${expedition.jdk.home}"/>
<property name="module.jdk.bin.biocode-fims" value="${expedition.jdk.bin}"/>
<property name="module.jdk.classpath.biocode-fims" value="${expedition.jdk.classpath}"/>
<property name="compiler.args.biocode-fims" value="${compiler.args}"/>
<property name="biocode-fims.output.dir" value="${module.biocode-fims.basedir}/out/production/biocode-fims"/>
<property name="biocode-fims.testoutput.dir" value="${module.biocode-fims.basedir}/out/test/biocode-fims"/>
<path id="biocode-fims.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="biocode-fims.module.production.classpath">
<path refid="${module.jdk.classpath.biocode-fims}"/>
<path refid="library.lib.classpath"/>
</path>
<!-- added by BJS -->
<path id="biocode-fims.module.buildtests.classpath">
<path refid="${module.jdk.classpath.biocode-fims}"/>
<pathelement location="${biocode-fims.output.dir}"/>
<path refid="library.lib.classpath"/>
</path>
<!-- added by BJS -->
<path id="biocode-fims.module.runtests.classpath">
<path refid="${module.jdk.classpath.biocode-fims}"/>
<pathelement location="${biocode-fims.output.dir}"/>
<pathelement location="${biocode-fims.testoutput.dir}"/>
<path refid="library.lib.classpath"/>
</path>
<path id="biocode-fims.runtime.production.module.classpath">
<pathelement location="${biocode-fims.output.dir}"/>
<path refid="library.lib.classpath"/>
</path>
<path id="biocode-fims.module.classpath">
<path refid="${module.jdk.classpath.biocode-fims}"/>
<pathelement location="${biocode-fims.output.dir}"/>
<path refid="library.lib.classpath"/>
</path>
<path id="biocode-fims.runtime.module.classpath">
<pathelement location="${biocode-fims.output.dir}"/>
<pathelement location="${biocode-fims.testoutput.dir}"/>
<path refid="library.lib.classpath"/>
</path>
<patternset id="excluded.from.module.biocode-fims">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.biocode-fims">
<patternset refid="excluded.from.module.biocode-fims"/>
</patternset>
<path id="biocode-fims.module.sourcepath">
<dirset dir="/">
<include name="src"/>
</dirset>
</path>
<target name="compile.module.biocode-fims" depends="compile.module.biocode-fims.production"
description="Compile module Biocode-FIMS"/>
<target name="compile.module.biocode-fims.production" description="Compile module Biocode-FIMS; production classes">
<mkdir dir="${biocode-fims.output.dir}"/>
<javac destdir="${biocode-fims.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}"
srcdir="src" memorymaximumsize="${compiler.max.memory}" fork="true"
executable="${module.jdk.bin.biocode-fims}/javac">
<compilerarg line="${compiler.args.biocode-fims}"/>
<bootclasspath refid="biocode-fims.module.bootclasspath"/>
<classpath refid="biocode-fims.module.production.classpath"/>
<patternset refid="excluded.from.compilation.biocode-fims"/>
</javac>
<copy todir="${biocode-fims.output.dir}">
<fileset dir="${module.biocode-fims.basedir}/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="clean.module.biocode-fims" description="cleanup module">
<delete dir="${biocode-fims.output.dir}"/>
<delete dir="${biocode-fims.testoutput.dir}"/>
</target>
<target name="init" description="Build initialization">
<!-- Perform any build initialization in this target -->
</target>
<target name="clean" depends="clean.module.biocode-fims" description="cleanup all">
<delete dir="${build}"/>
<delete dir="${classes}"/>
</target>
<target name="build.modules" depends="init, clean, compile.module.biocode-fims, war" description="build all modules"/>
<target name="war" depends="compile.module.biocode-fims.production">
<war destfile="dist/biocode-fims.war" webxml="web/WEB-INF/web.xml">
<fileset dir="web"/>
<lib dir="lib" excludes="servlet-api.jar"/>
<classes dir="${biocode-fims.output.dir}"/>
<classes dir="" includes="biocode-fims.props"/>
</war>
</target>
<target name="war_nmnh" depends="compile.module.biocode-fims.production">
<war destfile="dist/nmnh-fims.war" webxml="web_nmnh/WEB-INF/web.xml">
<fileset dir="web_nmnh"/>
<lib dir="lib" excludes="servlet-api.jar"/>
<classes dir="${biocode-fims.output.dir}"/>
<classes dir="" includes="biocode-fims.props"/>
</war>
</target>
<!-- added by BJS -->
<target name="test" depends="compile.module.biocode-fims">
<junit>
<classpath refid="biocode-fims.module.runtests.classpath"/>
<formatter type="brief" usefile="false"/>
<batchtest>
<fileset dir="${biocode-fims.testoutput.dir}" includes="**/*Test.class"/>
</batchtest>
</junit>
</target>
<target name="all" depends="build.modules" description="build all"/>
<!-- Everything below this line is from the original ANT task to build biocode-fims, before
we undertook the web-services framework. This portion keeps the Geneious plugin build.xml file happy -->
<property name="jar-name" value="biocode-fims"/>
<property name="build" location="build"/>
<property name="classes" location="classes"/>
<property name="src" location="src"/>
<path id="classpath">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="build" depends="compile">
<jar jarfile="${build}/${jar-name}.jar">
<fileset dir="${classes}"/>
</jar>
</target>
<target name="compile" depends="prepare">
<javac target="1.6" source="1.6" destdir="${classes}" debug="true">
<classpath refid="classpath"/>
<src path="${src}"/>
</javac>
</target>
<target name="prepare">
<mkdir dir="${build}"/>
<mkdir dir="${classes}"/>
</target>
</project>