Add some recommended attributes to javac tasks
[jabaws.git] / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <project default="build-all" name="Build Java Bioinformatics Analysis Web Services" basedir=".">
4
5         <property name="LD_LIBRARY_PATH" value="/gridware/sge/lib/lx24-amd64"/>
6
7         <!-- Distributive file names-->
8         <property name="distdir" value="website/archive"/>
9         <mkdir dir="${distdir}" />
10
11         <!-- projects details -->
12         <property name="project.url" value="http://www.compbio.dundee.ac.uk/jabaws"/>
13         <property name="product" value="Java Bioinformatics Analyses Web Services"/>
14         <property name="author" value="Alexander Sherstnev, Peter Troshin"/>
15
16         <!-- dependencies on other compbio projects  -->
17         <property name="compbio-annotation" value="compbio-annotations-1.0.jar"/>
18         <property name="compbio-util" value="compbio-util-1.4.jar"/>
19         <property name="compbio-ga" value="compbio-ga-1.1.jar"/>
20
21         <!-- products -->
22         <property name="jabaws_version" value="2.1.0"/>
23         <property name="core" value="${distdir}/jabaws-core-${jabaws_version}.jar"/>
24         <property name="core-src" value="${distdir}/jabaws-core-src-${jabaws_version}.jar"/>
25         <property name="datamodel" value="${distdir}/datamodel-${jabaws_version}.jar"/>
26         <property name="datamodel-src" value="${distdir}/datamodel-src-${jabaws_version}.jar"/>
27         <property name="min-jabaws-client" value="${distdir}/min-jabaws-client-${jabaws_version}.jar"/>
28         <property name="stat-updater" value="${distdir}/stat-updater-${jabaws_version}.jar"/>
29         <property name="min-jabaws-client-nolog" value="${distdir}/min-jabaws-client-nolog-${jabaws_version}.jar"/>
30         <property name="jabaws-client-src" value="${distdir}/jabaws-client-src-${jabaws_version}.jar"/>
31         <property name="full-jabaws-client" value="${distdir}/full-jabaws-client-${jabaws_version}.jar"/>
32         <property name="jabaws-source-jar" value="${distdir}/jabaws-src-${jabaws_version}.jar"/>
33         <property name="full-jabaws-client-pack" value="${distdir}/full-jabaws-client-${jabaws_version}-pack.zip"/>
34         <property name="jabaws" value="${distdir}/jabaws.war"/>
35         <property name="jabaws-no-binaries" value="${distdir}/jabaws-no-binaries.war"/>
36         <property name="binaries" value="${distdir}/binaries.zip"/>
37         <property name="jabaws-devel-web" value="${distdir}/jabaws-devel-website.zip"/>
38
39         <!--Whole project archive -->
40         <property name="jabaws-project" value="${distdir}/jabaws-project.zip"/>
41
42         <!-- java -->
43         <property name="test.src" location="${basedir}/testsrc" />
44         <property name="classes" location="${basedir}/WEB-INF/classes" />
45         <property name="lib.path" location="${basedir}/lib" />
46         <property name="web.lib.path" location="${basedir}/WEB-INF/lib" />
47         <property name="test.lib.path" location="${basedir}/testsrc/lib" />
48         <property name="activity.log" location="${basedir}/activity.log" />
49
50         <!-- add libraries -->
51         <path id="project.classpath">
52                 <fileset dir="${lib.path}">
53                         <include name="*.jar" />
54                 </fileset>
55                 <fileset dir="${web.lib.path}">
56                         <include name="*.jar" />
57                 </fileset>
58         </path>
59
60         <!-- add test classes -->
61         <path id="test.classpath">
62                 <fileset dir="${test.lib.path}">
63                         <include name="*.jar" />
64                 </fileset>
65                 <pathelement location="${classes}" />
66         </path>
67
68         <fileset dir="${basedir}/WEB-INF/classes/" id="fullclient">
69                 <!-- Datamodel -->
70                 <include name="compbio/data/**"/>
71                 <include name="compbio/metadata/**"/>
72                 <!-- Engines -->
73                 <include name="compbio/engine/**"/>
74                 <!-- Runners -->
75                 <include name="compbio/runner/**"/>
76                 <!-- Logging configuration -->
77         </fileset>
78
79         <fileset dir="${basedir}/WEB-INF/classes/" id="statupdater">
80                 <!-- Datamodel -->
81                 <include name="compbio/data/**"/>
82                 <include name="compbio/metadata/**"/>
83                 <!-- Engines -->
84                 <include name="compbio/engine/**"/>
85                 <!-- Runners -->
86                 <include name="compbio/runner/**"/>
87                 <!-- Runners -->
88                 <include name="compbio/stat/collector/**"/>
89                 <include name="compbio/ws/client/**"/>
90                 <!-- Logging configuration -->
91         </fileset>
92
93         
94         
95         <!-- Clean temp directories -->
96         <target name="clean">
97                 <delete dir="${classes}" />
98                 <delete dir="${basedir}/logs" />
99                 <delete file="${distdir}/binaries.zip" />
100                 <delete file="${basedir}/activity.log" />
101                 <delete file="${basedir}/derby.log" />
102                 <mkdir dir="${classes}" />
103                 <copy file="${basedir}/log/log4j.properties" tofile="${classes}/log4j.properties" />
104         </target>
105
106         <!-- Clean up temp directories and dist directory (all jar, zip, and war files deleted) -->
107         <target name="full-clean" depends="clean">
108                 <delete>
109                         <fileset dir="${distdir}">
110                                 <include name="*.jar"/>
111                                 <include name="*.zip"/>
112                                 <include name="*.war"/>
113                         </fileset>
114                 </delete>
115         </target>
116
117         <target name="clearStatDB" description="Remove all records from statistics database">
118                 <echo>Cleaning Statistics database</echo>
119                 <java classname="compbio.stat.collector.StatDB" fork="true" failonerror="true" classpath="${classes}">
120                         <jvmarg value="-Dlog4j.configuration=file:log/log4j.properties.statdb" />
121                         <classpath refid="project.classpath" />
122                 </java>
123         </target>
124
125         <!--
126         The compilation order is 
127         1. datamodel 
128         2. engine
129         3. runner
130         4. testscr
131         5. webservices
132         Packages of the lower order could not have dependencies on the packages on the next layer. 
133         So runners (layer 3) depends on the engines and the datamodel but engines does not depend on 
134         anything in runners or any other layers above. Testsrc is not allowed to test webservices. 
135         -->
136         <target name="compile_with_debug" depends="clean" description="Perform a multiple step compilation to ensure layered structure is preserved. Debug enabled.">
137                 <!-- copy files to class path-->
138                 <copy file="${basedir}/log/log4j.properties" tofile="${classes}/log4j.properties" />
139                 <!-- Complile the datamodel first -->
140                 <javac srcdir="${basedir}/datamodel" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
141                         <compilerarg value="-Xlint:unchecked"/>
142                         <classpath refid="project.classpath" />
143                 </javac>
144                 <!-- Complile the engines -->
145                 <javac srcdir="${basedir}/engine" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
146                         <compilerarg value="-Xlint:unchecked"/>
147                         <classpath refid="project.classpath" />
148                 </javac>
149                 <!-- Complile the runners -->
150                 <javac srcdir="${basedir}/runner" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
151                         <compilerarg value="-Xlint:unchecked"/>
152                         <classpath refid="project.classpath" />
153                 </javac>
154                 <!-- Complile the webservices -->
155                 <javac srcdir="${basedir}/webservices" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
156                         <compilerarg value="-Xlint:unchecked"/>
157                         <classpath refid="project.classpath" />
158                 </javac>
159                 <!-- Complile the tests -->
160                 <javac srcdir="${basedir}/testsrc" destdir="${classes}" target="1.6" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
161                         <compilerarg value="-Xlint:unchecked"/>
162                         <classpath refid="project.classpath" />
163                         <classpath refid="test.classpath" />
164                 </javac>
165         </target>
166
167         <!--
168         Compile with optimisation. Do not compile testsrc
169         The compilation order is 
170         1. datamodel 
171         2. engine
172         3. runner
173         4. webservices
174         Packages of the lower order could not have dependencies on the packages on the next layer. 
175         So runners (layer 3) depends on the engines and the datamodel but engines does not depend 
176         on anything in runners or any other layers above.
177         -->
178         <target name="compile" depends="clean" description="Perform a multiple step compilation to ensure layered structure is preserved. Debug disabled, optimisation enabled. Tests are not compiled.">
179                 <!-- copy files to class path-->
180                 <copy file="${basedir}/log/log4j.properties" tofile="${classes}/log4j.properties" />
181                 <!-- Complile the datamodel first -->
182                 <javac srcdir="${basedir}/datamodel" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="off" optimize="on" encoding="UTF-8" verbose="false" nowarn="true">
183                         <compilerarg value="-Xlint:-unchecked" />
184                         <classpath refid="project.classpath" />
185                 </javac>
186                 <!-- Complile the engines -->
187                 <javac srcdir="${basedir}/engine" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="off" optimize="on" encoding="UTF-8" verbose="false" nowarn="true">
188                         <compilerarg value="-Xlint:all" />
189                         <compilerarg value="-Xlint:-unchecked" />
190                         <classpath refid="project.classpath" />
191                 </javac>
192                 <!-- Complile the runners -->
193                 <javac srcdir="${basedir}/runner" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="off" optimize="on" encoding="UTF-8" verbose="false" nowarn="true">
194                         <compilerarg value="-Xlint:-unchecked" />
195                         <classpath refid="project.classpath" />
196                 </javac>
197                 <!-- Complile the webservices -->
198                 <javac srcdir="${basedir}/webservices" destdir="${classes}" target="1.6" source="1.6" includeantruntime="false" debug="off" optimize="on" encoding="UTF-8" verbose="false" nowarn="true">
199                         <compilerarg value="-Xlint:-unchecked" />
200                         <classpath refid="project.classpath" />
201                 </javac>
202         </target>
203
204         <target name="datamodel-jar" depends="compile" description="Pack data model classes">
205                 <echo>Jar file: Minimal WS client jar</echo>
206                 <delete file="${basedir}/${datamodel}"></delete>
207                 <jar jarfile="${basedir}/${datamodel}">
208                         <zipgroupfileset excludes="META-INF/*.SF" dir="${web.lib.path}" >
209                                 <include name="${compbio-util}"/>
210                                 <include name="${compbio-annotation}"/>
211                         </zipgroupfileset>
212                         <fileset dir="${basedir}/WEB-INF/classes/">
213                                 <include name="compbio/data/sequence/*.class"/>
214                                 <include name="compbio/metadata/*.class"/>
215                         </fileset>
216                         <manifest>
217                                 <attribute name="Built-By" value="${author}" />
218                                 <attribute name="Class-Path" value="." />
219                                 <attribute name="Implementation-Title" value="Datamodel for ${product} " />
220                                 <attribute name="Implementation-Vendor" value="${author}" />
221                                 <attribute name="Implementation-URL" value="${project.url}" />
222                         </manifest>
223                 </jar>
224         </target>
225
226         <target name="datamodel-source-jar" depends="compile" description="Pack java sources">
227                 <delete file="${datamodel-src}"></delete>
228                 <jar jarfile="${datamodel-src}">
229                         <fileset dir="${basedir}/datamodel">
230                                 <include name="**"/>
231                         </fileset>
232                         <zipgroupfileset excludes="META-INF/*.MF" dir="${lib.path}/src">
233                                 <include name="**"/>
234                         </zipgroupfileset>
235                         <manifest>
236                                 <attribute name="Built-By" value="${author}" />
237                                 <attribute name="Implementation-Title" value="${product} Datamodel Source Code Archive" />
238                                 <attribute name="Implementation-Vendor" value="${author}" />
239                                 <attribute name="Implementation-URL" value="${project.url}" />
240                         </manifest>
241                 </jar>
242         </target>
243
244         <target name="core-jar" depends="compile" description="Pack jabaws core classes">
245                 <echo>Jar file: JABAWS core jar</echo>
246                 <delete file="${basedir}/${core}"></delete>
247                 <jar jarfile="${basedir}/${core}">
248                         <zipgroupfileset excludes="META-INF/*.SF" dir="${web.lib.path}" >
249                                 <include name="${compbio-util}"/>
250                                 <include name="${compbio-annotation}"/>
251                         </zipgroupfileset>
252                         <fileset refid="fullclient"/>
253                         <manifest>
254                                 <attribute name="Built-By" value="${author}" />
255                                 <attribute name="Class-Path" value="." />
256                                 <attribute name="Implementation-Title" value="JABAWS Core for ${product}" />
257                                 <attribute name="Implementation-Vendor" value="${author}" />
258                                 <attribute name="Implementation-URL" value="${project.url}" />
259                         </manifest>
260                 </jar>
261         </target>
262         
263         <target name="core-source-jar" depends="compile" description="Pack jabaws core java sources">
264                 <delete file="${core-src}"></delete>
265                 <jar jarfile="${core-src}">
266                         <fileset dir="${basedir}/datamodel">
267                                 <include name="**"/>
268                         </fileset>
269                         <fileset dir="${basedir}/engine">
270                                 <include name="**"/>
271                         </fileset>
272                         <zipgroupfileset excludes="META-INF/*.MF" dir="${lib.path}/src">
273                                 <include name="**"/>
274                         </zipgroupfileset>
275                         <manifest>
276                                 <attribute name="Built-By" value="${author}" />
277                                 <attribute name="Implementation-Title" value="${product} JABAWS Core Source Code Archive" />
278                                 <attribute name="Implementation-Vendor" value="${author}" />
279                                 <attribute name="Implementation-URL" value="${project.url}" />
280                         </manifest>
281                 </jar>
282         </target>
283
284         <target name="jabaws-client-src-jar" depends="datamodel-source-jar" description="Pack metadata, data model, WS interfaces, a simple ws client class">
285                 <echo>Jar file: JABAWS client source</echo>
286                 <delete file="${jabaws-client-src}">
287                 </delete>
288                 <jar jarfile="${jabaws-client-src}">
289                         <zipgroupfileset  excludes="META-INF/*.MF" file="${datamodel-src}"/>
290                         <fileset dir="${basedir}/webservices">
291                                 <!-- This will include JAXWS artifacts. Alternatively they can be generated on the fly. -->
292                                 <include name="compbio/data/msa/**"/>
293                                 <exclude name="compbio/ws/client/ServicesUtil**"/>
294                                 <exclude name="compbio/ws/client/AAConClient**"/>
295                                 <include name="compbio/ws/client/**"/>
296                         </fileset>
297                         <manifest>
298                                 <attribute name="Built-By" value="${author}" />
299                                 <attribute name="Implementation-Title" value="${product} Client Source Code" />
300                                 <attribute name="Implementation-Vendor" value="${author}" />
301                                 <attribute name="Implementation-URL" value="${project.url}" />
302                         </manifest>
303                 </jar>
304         </target>
305
306         <target name="minimal-jabaws-client-jar" depends="compile, datamodel-jar" description="Pack metadata, data model, WS interfaces, a simple ws client class">
307                 <echo>Jar file: Minimal WS client jar</echo>
308                 <delete file="${basedir}/${min-jabaws-client}"></delete>
309                 <jar jarfile="${basedir}/${min-jabaws-client}">
310                         <zipgroupfileset excludes="META-INF/*.SF" dir="" includes="${datamodel}" />
311                         <fileset dir="${basedir}/WEB-INF/classes/">
312                                 <!-- This will include JAXWS artifacts. Alternatively they can be generated on the fly. -->
313                                 <include name="compbio/data/msa/**"/>
314                                 <include name="compbio/ws/client/**"/>
315                         </fileset>
316                         <zipgroupfileset excludes="META-INF/*" dir="" includes="WEB-INF/lib/log4j-1.2.15.jar" />
317                         <manifest>
318                                 <attribute name="Built-By" value="${author}" />
319                                 <attribute name="Main-Class" value="compbio.ws.client.Jws2Client" />
320                                 <attribute name="Class-Path" value="." />
321                                 <attribute name="Implementation-Title" value="Minimal ${product} Client" />
322                                 <attribute name="Implementation-Vendor" value="${author}" />
323                                 <attribute name="Implementation-URL" value="${project.url}" />
324                         </manifest>
325                 </jar>
326                 <delete file="${basedir}/${min-jabaws-client-nolog}"></delete>
327                 <jar jarfile="${basedir}/${min-jabaws-client-nolog}">
328                         <zipgroupfileset excludes="META-INF/*.SF" dir="" includes="${datamodel}" />
329                         <fileset dir="${basedir}/WEB-INF/classes/">
330                                 <!-- This will include JAXWS artifacts. Alternatively they can be generated on the fly. -->
331                                 <include name="compbio/data/msa/**"/>
332                                 <include name="compbio/ws/client/**"/>
333                         </fileset>
334                         <manifest>
335                                 <attribute name="Built-By" value="${author}" />
336                                 <attribute name="Main-Class" value="compbio.ws.client.Jws2Client" />
337                                 <attribute name="Class-Path" value="." />
338                                 <attribute name="Implementation-Title" value="Minimal ${product} Client" />
339                                 <attribute name="Implementation-Vendor" value="${author}" />
340                                 <attribute name="Implementation-URL" value="${project.url}" />
341                         </manifest>
342                 </jar>
343         </target>
344
345
346         <target name="stat-updater" depends="compile" description="Prepare executable jar for stat updater">
347                 <echo>Jar file: StatUpdater jar</echo>
348                 <delete file="${basedir}/${stat-updater}"></delete>
349                 <copy file="${basedir}/log/log4j.properties.updater" tofile="${basedir}/log4j.properties"/>
350                 <jar jarfile="${basedir}/${stat-updater}">
351                         <fileset dir="${basedir}">
352                                 <include name="log4j.properties"/>
353                         </fileset>
354                         <fileset refid="statupdater"/>
355                         <zipgroupfileset excludes="META-INF/*" dir="" includes="WEB-INF/lib/log4j-1.2.15.jar" />
356                         <zipgroupfileset excludes="META-INF/*" dir="" includes="WEB-INF/lib/derby-10.8.2.2.jar" />
357                         <zipgroupfileset excludes="META-INF/*" dir="" includes="lib/jcommander-1.30.jar" />
358                         <zipgroupfileset excludes="META-INF/*.SF" dir="${web.lib.path}" >
359                                 <include name="${compbio-util}"/>
360                         </zipgroupfileset>                      <manifest>
361                                 <attribute name="Built-By" value="${author}" />
362                                 <attribute name="Main-Class" value="compbio.stat.collector.ExecutionStatUpdater" />
363                                 <attribute name="Class-Path" value="." />
364                                 <attribute name="Implementation-Title" value="JABAWS Statistics Updating Program ${product}" />
365                                 <attribute name="Implementation-Vendor" value="${author}" />
366                                 <attribute name="Implementation-URL" value="${project.url}" />
367                         </manifest>
368                 </jar>
369                 <delete file="${basedir}/log4j.properties"/>
370         </target>
371         
372         <target name="full-jabaws-client-jar" depends="compile" description="Pack datamodel, engine and runners">
373                 <echo>Jar file: Full WS client jar</echo>
374                 <delete file="${full-jabaws-client}">
375                 </delete>
376                 <jar jarfile="${full-jabaws-client}">
377                         <zipgroupfileset excludes="META-INF/*.SF" dir="${web.lib.path}" >
378                                 <include name="${compbio-util}"/>
379                                 <include name="${compbio-annotation}"/>
380                                 <include name="drmaa.jar"/>
381                         </zipgroupfileset>
382                         <fileset refid="fullclient"/>
383                         <manifest>
384                                 <attribute name="Built-By" value="${author}" />
385                                 <attribute name="Class-Path" value="." />
386                                 <attribute name="Implementation-Title" value="Full ${product} Client" />
387                                 <attribute name="Implementation-Vendor" value="${author}" />
388                                 <attribute name="Implementation-URL" value="${project.url}" />
389                         </manifest>
390                 </jar>
391         </target>
392
393         <target name="full-jabaws-client" depends="full-jabaws-client-jar, pack-binaries" description="Pack binaries with sources and configuration files">
394                 <echo>Packing binaries, and configuration files</echo>
395                 <zip destfile="${full-jabaws-client-pack}" >
396                         <zipgroupfileset file="${binaries}" />
397                         <zipfileset dir="conf" prefix="conf" >
398                                 <exclude name="**/temp/**"/>
399                         </zipfileset>
400                         <fileset file="${full-jabaws-client}" />
401                 </zip>
402         </target>
403
404
405         <target name="source-jar" depends="datamodel-source-jar" description="Pack java sources">
406                 <delete file="${basedir}/${jabaws-source-jar}">
407                 </delete>
408                 <jar jarfile="${basedir}/${jabaws-source-jar}">
409                         <zipgroupfileset  excludes="META-INF/*.MF" file="${datamodel-src}"/>
410                         <fileset dir="${basedir}/runner">
411                                 <include name="**"/>
412                         </fileset>
413                         <fileset dir="${basedir}/engine">
414                                 <include name="**"/>
415                         </fileset>
416                         <fileset dir="${basedir}/webservices/">
417                                 <include name="**"/>
418                         </fileset>
419                         <manifest>
420                                 <attribute name="Built-By" value="${author}" />
421                                 <attribute name="Class-Path" value="." />
422                                 <attribute name="Implementation-Title" value="${product} Source Code Archive" />
423                                 <attribute name="Implementation-Vendor" value="${author}" />
424                                 <attribute name="Implementation-URL" value="${project.url}" />
425                         </manifest>
426                 </jar>
427         </target>
428
429         <target name="full-jabaws-jar" depends="compile" description="Pack datamodel, engine, runners, configuration, binaries and webservices">
430                 <echo>Jar file: Full WS client jar</echo>
431                 <delete file="${full-jabaws-client}">
432                 </delete>
433                 <jar jarfile="${full-jabaws-client}">
434                         <zipgroupfileset excludes="META-INF/*.SF" dir="${web.lib.path}" >
435                                 <include name="log4j-1.2.15.jar"/>
436                                 <include name="${compbio-util}"/>
437                                 <include name="${compbio-annotation}"/>
438                                 <include name="drmaa.jar"/>
439                         </zipgroupfileset>
440                         <fileset refid="fullclient">
441                         </fileset>
442                         <fileset dir="${basedir}/WEB-INF/classes/">
443                                 <!-- Statistics web application -->
444                                 <include name="compbio/stat/**"/>
445                                 <!-- Web services-->
446                                 <include name="compbio/ws/**"/>
447                         </fileset>
448                         <!-- Set WSTester as main to help user to test their deployments -->
449                         <manifest>
450                                 <attribute name="Built-By" value="${author}" />
451                                 <attribute name="Class-Path" value="." />
452                                 <attribute name="Main-Class" value="compbio.ws.client.WSTester" />
453                                 <attribute name="Implementation-Title" value="${product}" />
454                                 <attribute name="Implementation-Vendor" value="${author}" />
455                                 <attribute name="Implementation-URL" value="${project.url}" />
456                         </manifest>
457                 </jar>
458         </target>
459
460         <target name="pack-binaries" description="Zip all binary files">
461                 <delete file="${binaries}" failonerror="false"/>
462                 <zip destfile="${binaries}" >
463                         <zipfileset dir="${basedir}/binaries" prefix="binaries" excludes="**/linux*/**"/>
464                 </zip>
465         </target>
466
467         <target name="jabaws-no-binaries" depends="full-jabaws-jar, clearStatDB" description="Prepare JABAWS war file without native binaries">
468                 <echo>Preparing a war file without binaries</echo>
469                 <delete file="${jabaws-no-binaries}">
470                 </delete>
471                 <zip destfile="${jabaws-no-binaries}" whenempty="create">
472                         <zipfileset dir="${basedir}/WEB-INF" prefix="WEB-INF">
473                                 <exclude name="classes"/>
474                                 <!-- These are included into JABA client so exclude the jars -->
475                                 <exclude name="lib/drmaa.jar"/>
476                                 <exclude name="lib/log4j-1.2.15.jar"/>
477                                 <exclude name="lib/${compbio-annotation}"/>
478                                 <exclude name="lib/${compbio-util}"/>
479                                 
480                                 <include name="web.xml"/>
481                                 <include name="sun-jaxws.xml"/>
482                                 <include name="lib/*"/>
483                         </zipfileset>
484                         <zipfileset dir="${basedir}/ExecutionStatistic" prefix="ExecutionStatistic" />
485                         <zipfileset dir="${basedir}/statpages" prefix="statpages" />
486                         <zipfileset dir="${basedir}/jobsout" prefix="jobsout" excludes="**/*"/>
487                         <zipfileset dir="conf" prefix="conf" >
488                                 <exclude name="**/temp/**"/>
489                         </zipfileset>
490                         <!-- Add JABAWS web site apart from the binary archive -->
491                         <zipfileset dir="${basedir}/website" excludes="archive/**, devel*.html, tests/**, template.html"/>
492                         <zipfileset dir="." includes="${full-jabaws-client}" fullpath="WEB-INF/lib/jabaws-client.jar"/>
493                         <!-- Put a copy of log4j configuration file where it can be used  -->
494                         <zipfileset dir="log" includes="log4j.properties" prefix="WEB-INF/classes"/>
495                 </zip>
496         </target>
497
498         <target name="build-devel-website" description="Pack developement related pages, tests, javadoc" >
499                 <echo>Packing data for internal web site</echo>
500                 <delete file="${jabaws-devel-web}">
501                 </delete>
502                 <zip destfile="${jabaws-devel-web}" whenempty="create">
503                         <!-- Add JABAWS web site apart from the binary archive -->
504                         <zipfileset dir="${basedir}/website" excludes="template.html, download.html, index.html, manual.html, howto.html, archive/**, prog_docs/**"/>
505                 </zip>
506         </target>
507
508         <target name="jabaws-complete" depends="jabaws-no-binaries, pack-binaries" description="Prepare JABAWS war file without runtime dependency - JAXWS jars">
509                 <echo>Preparing a complete war file</echo>
510                 <delete file="${jabaws}">
511                 </delete>
512                 <copy tofile="${jabaws}" file="${jabaws-no-binaries}"/>
513                 <zip destfile="${jabaws}" update="true" >
514                         <zipgroupfileset file="${binaries}" />
515                 </zip>
516         </target>
517
518         <target name="build-all" depends="full-jabaws-client, minimal-jabaws-client-jar, jabaws-no-binaries, jabaws-complete, datamodel-jar, datamodel-source-jar, core-jar, core-source-jar, source-jar, jabaws-client-src-jar" description="Build-all the distributives"/>
519
520         <!-- This task does not really depends on compile, but it is better to make sure that the code is sound -->
521         <target name="archive-project" description="Pack everything in the project for those who do not have access to SVN" depends="compile">
522                 <delete file="${jabaws-project}">
523                 </delete>
524                 <zip destfile="${jabaws-project}" whenempty="create" >
525                         <fileset dir="." excludes="${distdir}/**, jobsout/**, test-output/**, **.svn, dundee-conf/**, TODO.txt, IDEAS.txt, ${activity.log}, **/*.zip, **/*.war"/>
526                         <!-- Add jobsout directory but no content -->
527                         <zipfileset dir="${basedir}/jobsout" prefix="jobsout" excludes="*/**"/>
528                 </zip>
529         </target>
530
531 <!-- ####################################################################################################################################### -->
532 <!-- Test targets -->
533         <taskdef name="testNG" classname="org.testng.TestNGAntTask">
534                 <classpath refid="test.classpath">
535                 </classpath>
536         </taskdef>
537
538         <target name="CustomTest" depends="compile_with_debug">
539                 <delete file="${activity.log}"/>
540                 <testNG haltonfailure="true" enableassert="true" >
541                         <jvmarg value="-server" />
542                         <jvmarg value="-enableassertions" />
543                         <jvmarg value="-Xms1024m" />
544                         <jvmarg value="-Xmx1024m" />
545                         <env key="LD_LIBRARY_PATH" value="${LD_LIBRARY_PATH}"/>
546                         <classpath refid="test.classpath" />
547                         <classpath refid="project.classpath" />
548                         <xmlfileset dir="." includes="temp-testng-customsuite.xml"/>
549                         <sysproperty key="TestingDataPath" value="${data.src}"/>
550                 </testNG>
551         </target>
552
553         <target name="Run_cluster_dependent_test" depends="compile_with_debug">
554                 <delete file="${activity.log}"/>
555                 <testNG groups="cluster" haltonfailure="true" enableassert="true" parallel="false" verbose="3">
556                         <jvmarg value="-server" />
557                         <jvmarg value="-enableassertions" />
558                         <jvmarg value="-Xms1024m" />
559                         <jvmarg value="-Xmx1024m" />
560                         <classfileset dir="${classes}" includes="**/*.class" />
561                         <env key="LD_LIBRARY_PATH" value="${LD_LIBRARY_PATH}"/>
562                         <classpath refid="test.classpath" />
563                         <classpath refid="project.classpath" />
564                         <sysproperty key="TestingDataPath" value="${data.src}"/>
565                 </testNG>
566         </target>
567
568         <target name="Test" depends="compile_with_debug">
569                 <delete file="${activity.log}"/>
570                 <testNG haltonfailure="true" enableassert="true" verbose="3" excludedgroups="performance, webservices" >
571                         <jvmarg value="-server" />
572                         <jvmarg value="-enableassertions" />
573                         <jvmarg value="-Xms1024m" />
574                         <jvmarg value="-Xmx1024m" />
575                         <classfileset dir="${classes}" includes="**/*.class" />
576                         <env key="LD_LIBRARY_PATH" value="${LD_LIBRARY_PATH}"/>
577                         <classpath refid="test.classpath" />
578                         <classpath refid="project.classpath" />
579                         <sysproperty key="TestingDataPath" value="${data.src}"/>
580                 </testNG>
581         </target>
582
583         <target name="Performance_tests" depends="compile_with_debug">
584                 <delete file="${activity.log}"/>
585                 <testNG haltonfailure="true" enableassert="true" verbose="3" groups="performance" >
586                         <jvmarg value="-server" />
587                         <jvmarg value="-enableassertions" />
588                         <jvmarg value="-Xms1024m" />
589                         <jvmarg value="-Xmx1024m" />
590                         <classfileset dir="${classes}" includes="**/*.class" />
591                         <env key="LD_LIBRARY_PATH" value="${LD_LIBRARY_PATH}"/>
592                         <classpath refid="test.classpath" />
593                         <classpath refid="project.classpath" />
594                         <sysproperty key="TestingDataPath" value="${data.src}"/>
595                 </testNG>
596         </target>
597
598         <target name="Test_runners" depends="compile_with_debug">
599                 <delete file="${activity.log}"/>
600                 <testNG groups="runner" haltonfailure="true" verbose="3" enableassert="true" >
601                         <jvmarg value="-server" />
602                         <jvmarg value="-enableassertions" />
603                         <jvmarg value="-Xms1024m" />
604                         <jvmarg value="-Xmx1024m" />
605                         <classfileset dir="${classes}" includes="**/*.class" />
606                         <env key="LD_LIBRARY_PATH" value="${LD_LIBRARY_PATH}"/>
607                         <classpath refid="test.classpath" />
608                         <classpath refid="project.classpath" />
609                         <sysproperty key="TestingDataPath" value="${data.src}"/>
610                 </testNG>
611         </target>
612
613         <target name="Test_engines" depends="compile_with_debug">
614                 <delete file="${activity.log}"/>
615                 <testNG groups="engine" haltonfailure="true" verbose="3" enableassert="true" >
616                         <jvmarg value="-server" />
617                         <jvmarg value="-enableassertions" />
618                         <jvmarg value="-Xms1024m" />
619                         <jvmarg value="-Xmx1024m" />
620                         <classfileset dir="${classes}" includes="**/*.class" />
621                         <env key="LD_LIBRARY_PATH" value="${LD_LIBRARY_PATH}"/>
622                         <classpath refid="test.classpath" />
623                         <classpath refid="project.classpath" />
624                         <sysproperty key="TestingDataPath" value="${data.src}"/>
625                 </testNG>
626         </target>
627
628         <target name="All_cluster_independent_windows_only_tests" depends="compile_with_debug">
629                 <delete file="${activity.log}" failonerror="false"/>
630                 <testNG excludedgroups="cluster, non_windows" haltonfailure="true" verbose="3" enableassert="true"  >
631                         <jvmarg value="-server" />
632                         <jvmarg value="-enableassertions" />
633                         <jvmarg value="-Xms1024m" />
634                         <jvmarg value="-Xmx1024m" />
635                         <classfileset dir="${classes}" includes="**/*.class" />
636                         <classpath refid="test.classpath" />
637                         <classpath refid="project.classpath" />
638                         <sysproperty key="TestingDataPath" value="${data.src}"/>
639                 </testNG>
640         </target>
641
642         <target name="All_cluster_independent_tests" depends="compile_with_debug">
643                 <delete file="${activity.log}" failonerror="false"/>
644                 <testNG excludedgroups="cluster, performance" haltonfailure="true" verbose="3" enableassert="true"  >
645                         <jvmarg value="-server" />
646                         <jvmarg value="-enableassertions" />
647                         <jvmarg value="-Xms1024m" />
648                         <jvmarg value="-Xmx1024m" />
649                         <classfileset dir="${classes}" includes="**/*.class" />
650                         <classpath refid="test.classpath" />
651                         <classpath refid="project.classpath" />
652                         <sysproperty key="TestingDataPath" value="${data.src}"/>
653                 </testNG>
654         </target>
655
656         <target name="Rerun_failed_tests" depends="compile_with_debug">
657                 <delete file="${activity.log}" failonerror="false"/>
658                 <testNG haltonfailure="true" enableassert="true" verbose="9" >
659                         <jvmarg value="-server" />
660                         <jvmarg value="-enableassertions" />
661                         <jvmarg value="-Xms1024m" />
662                         <jvmarg value="-Xmx1024m" />
663                         <env key="LD_LIBRARY_PATH" value="${LD_LIBRARY_PATH}"/>
664                         <classpath refid="test.classpath" />
665                         <classpath refid="project.classpath" />
666                         <xmlfileset dir="." includes="test-output/testng-failed.xml"/>
667                         <sysproperty key="TestingDataPath" value="${data.src}"/>
668                 </testNG>
669         </target>
670 </project>