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