-- tweaked spittoon.properties deployed to webapp
[Bookkeeping.git] / build.xml
blobcaf4bbaa7f485f93678f38c66402d5dab7be6e16
2 <project name="bookkeeping" default="usage" basedir=".">
3         
4         
5     <property name="ant.build.javac.target" value="1.5" />
6         
7     <!-- <path id="bookkeeping.classpath">
8                 <pathelement path="${dir.build}/test" />
9                 <pathelement path="${dir.build}/gen" />
10                 <pathelement path="${dir.build}/src" />
11                 <pathelement path="xml" />
12                 <fileset dir="${java.home}/lib" >
13                     <include name="*.jar"/>
14                 </fileset>
15                 <fileset dir="lib">
16                     <include name="**/*.jar" />
17                     <include name="**/*.properties"/>
18                 </fileset>
19     </path>
20     -->
21     
22         <path id="bookkeeping.classpath">
23                 <pathelement path="${dir.build}/gen" />
24                 <pathelement path="${dir.build}/src" />
25                 <pathelement path="${dir.build}/test" />
26                 <pathelement path="lib/" />
27                 <pathelement path="xml/" />
28                 <pathelement path="xml/http/" />
29                 <pathelement path="test/xml/" />
30                 <pathelement path="test/xml/http/" />
31                 <pathelement path="." />
32                 <fileset dir="lib">
33                     <include name="**/*.jar" />
34                     <include name="**/*.properties"/>
35                 </fileset>
36                 <fileset dir="${java.home}/lib" >
37                     <include name="**/*.jar"/>
38                 </fileset>
39         </path>
40         
41                         
42         <!-- Define the Cactus tasks -->
43         <path id="cactus.classpath" >
44                 <fileset dir="lib/">
45                     <include name="**/*.jar" />
46                     <include name="**/*.properties"/>
47                 </fileset>
48         </path>
49         
50     <target name="usage">
51                 
52                 <echo message="'bookkeeping' build targets..."/>
53                 
54                 <echo message=""/>
55                 <echo message="init"/>
56                 <echo message="clean"/>
57                 <echo message="compile-all"/>
58                 <echo message="compile-src"/>
59                 <echo message="compile-tests"/>
60                 <echo message="compile-gen"/>
61                 
62                 <echo message=""/>
63                 <echo message="run-gen"/>
64                 <echo message="run-cc"/>
65                 <echo message="run-tests"/>
66                 <echo message="run-test"/>
67                 <echo message="run-docs"/>
68                 <echo message="run-class"/>
69                 <echo message="deploy"/>
70         <echo message="deploy-war"/>
71         
72                 <echo message="release"/>
73                 <echo message="release-war"/>
74                 
75                 <echo message="cactus-deploy"/>
76                 <echo message="cactus-run"/>
77                 
78                 <echo message=""/>
79                 <echo message="compile-htest"/>
80                 <echo message="run-htest"/>
81                 
82     </target>
84     
85     <!-- =============================== -->
86     <!-- TASK DEFINITIONS               -->
87     <!-- =============================== -->
88     <taskdef name="if" classpathref="bookkeeping.classpath" classname="ise.antelope.tasks.IfTask"/>
89     <taskdef name="sablecc" classpathref="bookkeeping.classpath" classname="org.sablecc.ant.taskdef.Sablecc"/>
90     <taskdef resource="cactus.tasks" >
91                 <classpath>
92                         <pathelement location="lib/cactus/cactus.core.framework.uberjar.javaEE.14-1.8.1.jar" />
93                         <pathelement location="lib/cactus/cactus.integration.shared.api-1.8.1.jar" />
94                         <pathelement location="lib/cactus/cactus.integration.ant-1.8.1.jar" />
95                         <pathelement location="lib/cactus/cargo-ant-1.0-beta-2.jar" />
96                         <pathelement location="lib/cactus/cargo-core-uberjar-1.0-beta-2.jar" />
97                         <pathelement location="lib/cactus/commons-httpclient-3.1.jar" />
98                         <pathelement location="lib/cactus/commons-logging-1.1.jar" />
99                         <pathelement location="lib/cactus/aspectjrt-1.5.3.jar" />
100                         <pathelement location="lib/cactus/jdom.jar" />
101                         <pathelement location="lib/cactus/junit-3.8.2.jar" />
102                         <pathelement location="lib/htmlunit/jaxen-1.1.1.jar" />
103                         <pathelement location="lib/jsch-0.1.8.jar" />
104                         <pathelement location="lib/jdepend-2.9.1.jar" />
105                                 <pathelement location="lib/cactus/commons-discovery-0.4.jar" />
106                                 <pathelement location="lib/cactus/httpunit-1.6.jar" />
107                                 <pathelement location="lib/cactus/nekohtml-1.9.6" />
108                                 
109                 </classpath>
110     </taskdef>
111         
114     <!-- =============================== -->
115     <!-- INITIALIZE THE BUILD PROCESS    -->
116     <!-- =============================== -->
117     <target name="init" >
118                 <loadproperties srcFile="build.properties" />
119     </target>
122     <!-- =============================== -->
123     <!-- CLEAN OUT THE BUILD FILES       -->
124     <!-- =============================== -->
125     <target name="clean" depends="clean-src, clean-gen, clean-cc" >
126                 <delete dir="build" failonerror="false" />
127     </target>
128     <target name="clean-src">
129                 <delete dir="build/src" failonerror="false" />
130     </target>
131     <target name="clean-gen">
132                 <delete dir="gen" failonerror="false" />
133                 <delete dir="build/gen" failonerror="false" />
134     </target>
135     <target name="clean-cc">
136                 <delete dir="cc/com" failonerror="false" />
137     </target>
138         
139         
140     <!-- =============================== -->
141     <!-- CREATE the generated java files -->
142     <!-- =============================== -->
143     <target name="run-gen" >
144                 
145                 <available file="gen/" property="genExists" />
146                 <if name="genExists">
147                         
148                     <else>
149                                 
150                         <mkdir dir="gen/"/>
151                         
152                         <!-- BOB GENERATION --> 
153                                 <java classname="com.interrupt.bob.Main" classpathref="bookkeeping.classpath" fork="yes" >
154                                 
155                                         <!-- <arg line="-gen gen -base . -end .xml -def ${xml.files} -sys ${system.files}" /> --> 
156                                         <arg line="-gen gen -base . -end .xml -def 'xml/bookkeeping.2.bookkeeping.xml xml/bookkeeping.2.transactions.xml xml/bookkeeping.2.users.xml xml/bookkeeping.authorise.xml xml/bookkeeping.system.xml xml/bookkeeping.debitPointers.xml test/xml/test.currencies.xml test/xml/test.currencies.badpointers.xml' -sys 'xml/bookkeeping.2.bookkeeping.xml xml/bookkeeping.2.transactions.xml xml/bookkeeping.2.users.xml xml/bookkeeping.authorise.xml xml/bookkeeping.system.xml xml/bookkeeping.debitPointers.xml test/xml/test.currencies.xml test/xml/test.currencies.badpointers.xml'" />
157                                 </java>
158                         
159                     </else>
160                 </if>
161     </target>
162     
163     
164     <!-- =============================== -->
165     <!-- COMPILE targets                 -->
166     <!-- =============================== -->
167     <target name="compile-all" depends="init,run-gen,compile-src,compile-tests"/>
168         
169     <target name="compile-src" depends="init,compile-gen">
170                 
171                 <echo message="COMPILING JAVA SOURCE"/>
172                 <mkdir dir="${dir.build}/src"/>
173                 
174                 <javac srcdir="${dir.src}" destdir="${dir.build}/src" debug="true" fork="yes" >
175                         
176                         <!-- 
177                         -Xlint:deprecation
178                         <compilerarg line="-Xlint" />
179                         <arg value="com.interrupt.bookkeeping.AllTests" />
180                         -->
181                         <classpath>
182                                 <pathelement path="${dir.build}/test" />
183                                 <pathelement path="${dir.build}/gen" />
184                                 <pathelement path="${dir.build}/src" />
185                                 <pathelement path="xml" />
186                                 <fileset dir="${java.home}/lib" >
187                                         <include name="**/*.jar"/>
188                                 </fileset>
189                                 <fileset dir="lib">
190                                         <include name="**/*.jar" />
191                                         <include name="**/*.properties"/>
192                                 </fileset>
193                         </classpath>
194                 </javac>
195                 
196     </target>
197         
198         
199         <target name="run-cc" depends="init"> 
200                 
201         <available file="gen/com/interrupt/bookkeeping/cc/analysis" property="ccExists" />
202                 <if name="ccExists">
203                         
204                     <else>
205                                 
206                         <mkdir dir="gen" />
207                         <sablecc src="cc" outputdirectory="gen" includes="*.grammar" />
208                         
209                         <!-- need to hack the lexer code and there's no easy way to sub-type --> 
210                         <copy todir="gen/com/interrupt/bookkeeping/cc/lexer/" overwrite="true"> 
211                                 <fileset file="src/com/Lexer.java" /> 
212                         </copy> 
213                 
214                     </else>
215                 </if>
216                 
217         </target>
218         
219         
220     <target name="compile-htest" depends="init">
221         
222         <echo message="COMPILING htest"/>
223         <javac srcdir="htest" destdir="." fork="yes" deprecation="on" >
225             <classpath>
226                 <fileset dir="${java.home}/lib" >
227                     <include name="**/*.jar"/>
228                 </fileset>
229                 <fileset dir="lib">
230                     <include name="**/*.jar" />
231                 </fileset>
232             </classpath>
233         </javac>
234         
235     </target>
236     <target name="run-htest" depends="compile-htest,init">
238         <echo message="RUNNING htest"/>
239         <java classname="Testing" >
241             <classpath>
242                 <pathelement path="." />
243                 <fileset dir="${java.home}/lib" >
244                     <include name="**/*.jar"/>
245                 </fileset>
246                 <fileset dir="lib">
247                     <include name="**/*.jar" />
248                 </fileset>
249             </classpath>
250         </java>
251         
252     </target>
253     
254     <target name="compile-tests" depends="init, compile-src">
255                 
256                 <echo message="COMPILING JAVA TESTS"/>
257                 <mkdir dir="${dir.build}/test"/>
258                 <javac srcdir="${dir.test.src}" destdir="${dir.build}/test" debug="true" deprecation="on" >
259                         
260                         <!-- <compilerarg line="-Xlint" />
261                         -->
262                     <classpath>
263                         <pathelement path="${dir.build}/gen" />
264                         <pathelement path="${dir.build}/src" />
265                         <pathelement path="${dir.build}/test" />
266                         <pathelement path="xml" />
267                         <fileset dir="${java.home}/lib" >
268                             <include name="**/*.jar"/>
269                         </fileset>
270                         <fileset dir="lib">
271                             <include name="**/*.jar" />
272                             <include name="**/*.properties"/>
273                         </fileset>
274                     </classpath>
275                 </javac>
276                 
277     </target>
278         
279     <target name="compile-gen" depends="init,run-gen,run-cc">
280                 
281         
282                 <!-- copy over Token with a toString() that doesn't add extra stuff 
283                 <copy todir="gen/com/interrupt/bookkeeping/cc/node/" overwrite="true"> 
284                         <fileset file="src/com/interrupt/bookkeeping/cc/node/Token.java" /> 
285                 </copy> 
286         -->
287                 
288                 <echo message="COMPILING GEN SOURCE"/>
289                 <mkdir dir="${dir.build}/gen"/>
290                 <javac srcdir="gen" destdir="${dir.build}/gen" fork="yes" debug="true" deprecation="on" >
291                         
292                         <classpath>
293                                 <pathelement path="${dir.build}/src" />
294                                 <pathelement path="${dir.build}/test" />
295                                 <fileset dir="${java.home}/lib" >
296                                     <include name="**/*.jar"/>
297                                 </fileset>
298                                 <fileset dir="lib">
299                                     <include name="**/*.jar" />
300                                     <include name="**/*.properties"/>
301                                 </fileset>
302                     </classpath>
303                 </javac>
304                 
305                 
306                 <!-- copy over SableCC dat files -->
307                 <copy todir="${dir.build}/gen" > 
308                         <fileset dir="gen" includes="**/*.dat" />
309                 </copy> 
310                 
311     </target>
312     
313         
314         
315     <!-- =============================== -->
316     <!-- RUN targets                    -->
317     <!-- =============================== -->
318     <target name="run-tests" depends="compile-tests" >
319                 
320                 <echo message="RUNNING UNIT TESTS in directory:  ${dir.test.src}"/>
321                 <!-- <java classname="junit.textui.TestRunner" classpathref="bookkeeping.classpath" fork="yes" > -->
322                 <java classname="junit.textui.TestRunner" fork="yes" >
323                         
324                         <arg value="com.interrupt.bookkeeping.AllTests" />
325                         
326                         <classpath>
327                                 <pathelement path="${dir.build}/gen" />
328                                 <pathelement path="${dir.build}/src" />
329                                 <pathelement path="${dir.build}/test" />
330                                 <pathelement path="lib/" />
331                                 <pathelement path="xml/" />
332                                 <pathelement path="xml/http/" />
333                                 <pathelement path="test/xml/" />
334                                 <pathelement path="test/xml/http/" />
335                                 <pathelement path="." />
336                                 
337                                 <fileset dir="lib">
338                                     <include name="**/*.jar" />
339                                     <include name="**/*.properties"/>
340                                 </fileset>
341                                 <fileset dir="${java.home}/lib" >
342                                     <include name="**/*.jar"/>
343                                 </fileset>
344                         </classpath>
345                         
346                 </java>
347         
348     </target>
349         
350         <target name="run-test" depends="compile-tests" >
351                 
352                 <echo message="RUNNING a Single UNIT TEST in directory:  ${dir.test.src}"/>
353                 <!-- <java classname="junit.textui.TestRunner" fork="yes" >
354                         
355                         <sysproperty key="db.url" value="xmldb:exist:///db/bookkeeping/" />
356                         <sysproperty key="exist.initdb" value="true" />
357                         <sysproperty key="exist.home" value="." />
358                         <arg value="com.interrupt.bookkeeping.cc.kkell.aauth.TestAAuthentication" />
359                         
360                         <classpath>
361                                 <pathelement path="${dir.build}/gen" />
362                                 <pathelement path="${dir.build}/src" />
363                                 <pathelement path="${dir.build}/test" />
364                                 <pathelement path="lib/" />
365                                 <pathelement path="xml/" />
366                                 <pathelement path="xml/http/" />
367                                 <pathelement path="test/xml/http/" />
368                                 <pathelement path="." />
369                                 <fileset dir="lib">
370                                     <include name="**/*.jar" />
371                                     <include name="**/*.properties"/>
372                                 </fileset>
373                                 <fileset dir="${java.home}/lib" >
374                                     <include name="*.jar"/>
375                                 </fileset>
376                         </classpath>
377                         
378                 </java>
379                 <java classname="junit.textui.TestRunner" fork="yes" >
380                         
381                         <sysproperty key="db.url" value="xmldb:exist:///db/bookkeeping/" />
382                         <sysproperty key="exist.initdb" value="true" />
383                         <sysproperty key="exist.home" value="." />
384                         <arg value="com.interrupt.bookkeeping.TestGeneral" />
385                         <classpath>
386                                 <pathelement path="${dir.build}/gen" />
387                                 <pathelement path="${dir.build}/src" />
388                                 <pathelement path="${dir.build}/test" />
389                                 <pathelement path="lib/" />
390                                 <pathelement path="xml/" />
391                                 <pathelement path="xml/http/" />
392                                 <pathelement path="test/xml/" />
393                                 <pathelement path="test/xml/http/" />
394                                 <pathelement path="." />
395                                 <fileset dir="lib">
396                                     <include name="**/*.jar" />
397                                     <include name="**/*.properties"/>
398                                 </fileset>
399                                 <fileset dir="${java.home}/lib" >
400                                     <include name="*.jar"/>
401                                 </fileset>
402                         </classpath>
403                 </java>
404                 --> 
405                 
406                 <java classname="junit.textui.TestRunner" fork="yes" >
407                         
408                         <sysproperty key="db.url" value="xmldb:exist:///db/bookkeeping/" />
409                         <sysproperty key="exist.initdb" value="true" />
410                         <sysproperty key="exist.home" value="." />
411                         
412                         <sysproperty key="org.xml.sax.features.validation" value="false" />
413                         <sysproperty key="java.endorsed.dirs" value="lib/endorsed" />
414                         
415                         <arg value="com.interrupt.bookkeeping.cc.kkell.TestBKellFunctional" />
416                         <classpath>
417                                 <pathelement path="${dir.build}/gen" />
418                                 <pathelement path="${dir.build}/src" />
419                                 <pathelement path="${dir.build}/test" />
420                                 <pathelement path="lib/" />
421                                 <pathelement path="xml/" />
422                                 <pathelement path="xml/http/" />
423                                 <pathelement path="test/bk/" />
424                                 <pathelement path="test/xml/" />
425                                 <pathelement path="test/xml/http/" />
426                                 <pathelement path="." />
427                                 <fileset dir="lib">
428                                     <include name="**/*.jar" />
429                                     <include name="**/*.properties"/>
430                                 </fileset>
431                                 <fileset dir="${java.home}/lib" >
432                                     <include name="**/*.jar"/>
433                                 </fileset>
434                         </classpath>
435                 </java>
436                 
437     </target>
438         
439         
440         <target name='cactus-deploy' depends='release-war' >
441                 
442                 <echo message="DEPLOYING 'bookkeeping-cactus.war' to ${tomcat.home}/webapps " />
443                 <available file="build/bookkeeping-cactus.war" property="cactusExists" />
444                 <if name="cactusExists">
445                     <else>
446                                 <cactifywar destfile="build/bookkeeping-cactus.war" srcfile="build/webkell.war" mergewebxml="webmerge.xml" />
447                         </else>
448                 </if>
449                 <!-- <copy todir="${tomcat.home}/webapps/" 
450                         file="build/bookkeeping-cactus.war" />
451                 --> 
452                 
453         </target>
454         
455         
456         <target name='cactus-run' depends='cactus-deploy' >
457                 
458                 <property name="CATALINA_HOME" value="${tomcat.home}" /> 
459                 <property name="CATALINA_BASE" value="${tomcat.home}" /> 
460                 <property name="CATALINA_TMPDIR" value="${tomcat.home}/temp" /> 
461                 <exec executable="${tomcat.home}/bin/setclasspath.sh">
462                 </exec> 
463                 
464                 <cactus warfile="/Users/timothyw/Projects/Bookkeeping/build/bookkeeping-cactus.war"
465                 printsummary="yes" failureproperty="tests.failed">
466                         
467                         <cactusproperty server="false" propertiesFile="build.properties"/>
468                         <classpath >
469                                 <path refid="bookkeeping.classpath"/>
470                         </classpath>
471                         
472                         <containerset>
473                         <cargo containerId="tomcat5x" output="${logs.dir}/output.log" log="${logs.dir}/cargo.log" home="${tomcat.home}">
474                             <configuration>
475                                 <property name="cargo.servlet.port" value="${cargo.servlet.port}"/>
476                                 <property name="cargo.logging" value="${cargo.logging}"/>
477                                 <deployable type="${cactus.sample.archive.type}" file="${cactified.servlet.archive.name}"/>
478                             </configuration>
479                         </cargo>
480                         <!-- <tomcat5x dir="${tomcat.home}" port="8070" /> -->  
481                         </containerset>
482                         
483                         <formatter type="xml"/>
484                         <batchtest>
485                         <fileset dir="${dir.test.src}">
486                                 <!-- <include name="**/CactusTests.java"/> --> 
487                                 <exclude name="**/TestAll.java"/>
488                         </fileset>
489                         </batchtest>
490                 </cactus>
491         </target>
492         
493         
494         <target name='run-class' depends='compile-src' > 
495                 
496                 
497                 <java classname="com.interrupt.bookkeeping.cc.bkell.Bkell" classpathref="bookkeeping.classpath" fork='true' >
498                         
499                         <classpath>
500                                 <pathelement path="${dir.build}/test" />
501                                 <pathelement path="${dir.build}/gen" />
502                                 <pathelement path="${dir.build}/src" />
503                                 <pathelement path="xml" />
504                                 <fileset dir="${java.home}/lib" >
505                                         <include name="**/*.jar"/>
506                                 </fileset>
507                                 <fileset dir="lib">
508                                         <include name="**/*.jar" />
509                                         <include name="**/*.properties"/>
510                                 </fileset>
511                         </classpath>
512                 </java>
513                 
514                 
515                 <!-- <java classname="com.interrupt.persistence.xml.Spittoon" fork="true" >
516                         
517                         <sysproperty key="db.url" value="xmldb:exist:///db/bookkeeping/" />
518                         <sysproperty key="exist.initdb" value="true" />
519                         <sysproperty key="exist.home" value="." />
520                         
521                         <classpath>
522                                 <pathelement path="${dir.build}/gen" />
523                                 <pathelement path="${dir.build}/src" />
524                                 <pathelement path="${dir.build}/test" />
525                                 <pathelement path="lib/" />
526                                 <pathelement path="xml/" />
527                                 <pathelement path="xml/http/" />
528                                 <pathelement path="grammar" />
529                                 <pathelement path="." />
530                                 <fileset dir="lib">
531                                         <include name="**/*.jar" />
532                                         <include name="**/*.properties"/>
533                                 </fileset>
534                                 <fileset dir="${java.home}/lib" >
535                                         <include name="*.jar"/>
536                                 </fileset>
537                         </classpath>
538                 </java>
539                 --> 
540                 
541                 <!-- <java classname="com.interrupt.bookkeeping.http.BookkeepingSystemFacade" fork="true" >
542                 <java classname="com.interrupt.bookkeeping.Deleteme" fork="true" >
543                         
544                         <sysproperty key="db.url" value="xmldb:exist:///db/bookkeeping/" />
545                         <sysproperty key="exist.initdb" value="true" />
546                         <sysproperty key="exist.home" value="." />
547                         
548                         <classpath>
549                                 <pathelement path="${dir.build}/gen" />
550                                 <pathelement path="${dir.build}/src" />
551                                 <pathelement path="${dir.build}/test" />
552                                 <pathelement path="lib/" />
553                                 <pathelement path="xml/" />
554                                 <pathelement path="xml/http/" />
555                                 <pathelement path="test/bk/" />
556                                 <pathelement path="test/xml/" />
557                                 <pathelement path="test/xml/http/" />
558                                 <pathelement path="." />
559                                 <fileset dir="lib">
560                                     <include name="**/*.jar" />
561                                     <include name="**/*.properties"/>
562                                 </fileset>
563                                 <fileset dir="${java.home}/lib" >
564                                     <include name="**/*.jar"/>
565                                 </fileset>
566                         </classpath>
567                 </java>
568                 --> 
569                 
570         </target> 
571         
572         
573     <target name="run-docs" depends="compile-gen" >
574         
575         <javadoc destdir="doc/api" 
576             windowtitle="Bookkeeping API" 
577             sourcepath="src/:gen/"
578             classpathref="bookkeeping.classpath" >
580             <package name="com.interrupt.bookkeeping" />
581             <package name="com.interrupt.bookkeeping.account" />
582             <package name="com.interrupt.bookkeeping.action" />
583                 
584                 <package name="com.interrupt.bookkeeping.cc" />
585                 <package name="com.interrupt.bookkeeping.cc.bkell" />
586                 <package name="com.interrupt.bookkeeping.cc.bkell.command" />
587                 <package name="com.interrupt.bookkeeping.cc.executor" />
588                 <package name="com.interrupt.bookkeeping.cc.analysis" />
589                 <package name="com.interrupt.bookkeeping.cc.lexer" />
590                 <package name="com.interrupt.bookkeeping.cc.parser" />
591                 <package name="com.interrupt.bookkeeping.cc.node" />
592                 
593                 <!-- DELETE 'node' package 
594                 <package name="com.interrupt.bookkeeping.cc.node" />
595                 --> 
596                 
597                 <package name="com.interrupt.bookkeeping.exception" />
598             <package name="com.interrupt.bookkeeping.http" />
600                 <!-- DELETE 'interpreter' package 
601                 <package name="com.interrupt.bookkeeping.interpreter" />
602                 --> 
603                 
604             <package name="com.interrupt.bookkeeping.journal" />
605             <package name="com.interrupt.bookkeeping.system" />
606                 <package name="com.interrupt.bookkeeping.users" />
607                 <package name="com.interrupt.bookkeeping.util" />
608             <package name="com.interrupt.bookkeeping.workflow" />
609             <package name="com.interrupt.persistence" />
610             <package name="com.interrupt.persistence.or" />
611             <package name="com.interrupt.persistence.xml" />
612         </javadoc>
613     </target>
614     
615     
616     <!-- =============================== -->
617     <!-- DEPLOY targets                 -->
618     <!-- =============================== -->
619     
620         <target name="release" depends="compile-src" >
621                 
622                 <!-- jar main classes. Jar dependencies and properties files should be zipped into a lib directory
623                 -->
624                 <jar destfile="${dir.build}/bookkeeping.jar" >
625                         
626                         <fileset dir="${dir.build}/gen" includes="**/*.class" />
627                         <fileset dir="${dir.build}/gen" includes="**/*.dat" />
628                         <fileset dir="${dir.build}/src" includes="**/*.class" />
629                         <manifest >
630                                 <attribute name="Main-Class" value="com.interrupt.bookkeeping.cc.bkell.Bkell" />
631                                 <attribute name="Class-Path" value="${dir.lib}/Piccolo.jar  ${dir.lib}/commons-cli-1.0.jar  ${dir.lib}/commons-logging-api.jar  ${dir.lib}/javafind.jar  ${dir.lib}/commons-logging.jar  ${dir.lib}/bob.jar  ${dir.lib}/sablecc.jar  ${dir.lib}/log4j-1.2.7.jar  ${dir.lib}/velocity-1.3.1.jar  ${dir.lib}/velocity-dep-1.3.1.jar  ${dir.lib}/exist-optional.jar  ${dir.lib}/exist-modules.jar  ${dir.lib}/exist.jar  ${dir.lib}/xmldb.jar ${dir.lib}/xmlrpc-1.2-patched.jar " />
632                         </manifest>
633                 </jar>
634                 
635                 
636         </target> 
637         
638         <target name="release-war" depends="init, release" > 
639                 
640                 <echo message="Making webkell.war" />
641                 
642                 <!-- copy libs to a tempporary flattened directory --> 
643                 <mkdir dir="temp" /> 
644                 <copy todir="temp" flatten="true" > 
645                         <fileset dir="." >
646                                 <include name="confAauth.xml"/>
647                                 <include name="confGroups.xml"/>
648                                 <include name="xml/bookkeeping.system.xml"/>
649                         </fileset>
650                         <fileset dir="${dir.lib}" >
651                                 <include name="**/*.jar"/>
652                                 <include name="**/*.properties"/>
653                                 <exclude name="**/spittoon.properties" />
654                                 <exclude name="**/servlet-api-2.5-6.0.0rc0.jar" />
655                         </fileset>
656                 </copy> 
657                 <move file="temp/spittoon.web.properties" tofile="temp/spittoon.properties"/>
659                 <war destfile="${dir.build}/webkell.war" webxml="${dir.lib}/web.xml" >
660                         
661                         <fileset dir="webkell" includes="*.xhtml" />
662                         
663                         <!-- <fileset dir="lib" includes="exist-data/**" /> -->
664                         <zipfileset file="dataGroups/**"
665                                 prefix="WEB-INF/lib/dataGroups" />
666                         <zipfileset file="dataAauth/**"
667                                 prefix="WEB-INF/lib/dataAauth" />
668                         
669                         <zipfileset file="xml/*.xml"
670                                 prefix="WEB-INF/xml" />
671             
672                         <!-- <webinf ><includesfile name="lib/exist.conf.xml"/></webinf> 
673                         <zipfileset file="lib/exist-conf.xml"
674                             prefix="WEB-INF"/>
675                         -->
676                         <classes dir="${dir.build}/gen" includes="**/*.class" />
677                         <classes dir="${dir.build}/gen" includes="**/*.dat" />
678                         <classes dir="${dir.build}/src" includes="**/*.class" />
679                         <classes dir="temp" includes="*.properties" />
680                         
681                         <!-- ** TODO Find a better place to put this. an 'xml' directory that can be added to the classpath --> 
682                         <classes dir="test/xml/http" includes="**/*.xml" />
683                         <classes dir="xml" file="xml/bookkeeping.system.xml" />
684                         
685                         
686                         <!-- test classes to include in war 
687                         <classes dir="${dir.build}/test" includes="**/*.class" />
688                         -->
689                         
690                         <!-- <lib dir="lib" fullpath="WEB-INF/lib" > -->
691                         <lib dir="temp" >
692                                 <include name="**/*.jar"/>
693                                 <include name="**/*.properties"/>
694                                 <include name="confAauth.xml" />
695                                 <include name="confGroups.xml" />
696                                 <include name="bookkeeping.system.xml"/>
697                                 <exclude name="**/servlet-api-2.5-6.0.0rc0.jar" />
698                         </lib>
699                         <manifest >
700                                 <attribute name="Class-Path" value="lib/cactus lib/endorsed lib/htmlunit lib/ xml/" />
701                         </manifest>
702                 </war>
703                 
704                 <!-- delete temporary directory after war creation 
705                 <delete dir="temp" /> 
706                 -->
707                
709         </target> 
710         <target name="deploy-war" depends="release-war" > 
711                 
712                 <echo message="Deploying webkell.war" />
713                 <delete dir="${tomcat.home}/webapps/webkell" failonerror="false" />
714                 <delete file="${tomcat.home}/webapps/webkell.war" failonerror="false" />
715                 <copy file="${dir.build}/webkell.war" todir="${tomcat.home}/webapps" /> 
716                 
717         </target>
718         
719         <target name="release-scratch" depends="init" >
720                 
721                 <!-- jar main classes. Jar dependencies and properties files should be zipped into a lib directory
722                 -->
723                 <jar destfile="${dir.build}/bookkeeping.jar" >
724                         
725                         <fileset dir="${dir.build}/gen" includes="**/*.class" />
726                         <fileset dir="${dir.build}/gen" includes="**/*.dat" />
727                         <fileset dir="${dir.build}/src" includes="**/*.class" />
728                         <fileset dir="." includes="xml/*.xml" />
729                         <manifest >
730                                 <attribute name="Main-Class" value="com.interrupt.bookkeeping.cc.bkell.Bkell" />
731                                 <attribute name="Class-Path" value="${dir.lib}/Piccolo.jar  ${dir.lib}/commons-cli-1.0.jar  ${dir.lib}/commons-logging-api.jar  ${dir.lib}/javafind.jar  ${dir.lib}/commons-logging.jar  ${dir.lib}/bob.jar  ${dir.lib}/sablecc.jar  ${dir.lib}/log4j-1.2.7.jar  ${dir.lib}/velocity-1.3.1.jar  ${dir.lib}/velocity-dep-1.3.1.jar  ${dir.lib}/exist-optional.jar  ${dir.lib}/exist-modules.jar  ${dir.lib}/exist.jar  ${dir.lib}/xmldb.jar ${dir.lib}/xmlrpc-1.2-patched.jar xml/ " />
732                         </manifest>
733                 </jar>
734                 
735                 
736         </target> 
737     
738     
739 </project>