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