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