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