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