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