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