fixing accounts panel z index
[Bookkeeping.git] / build.xml
blobc40c00c4049f2947fcf4f87504c2b4cdf3b510d7
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         <delete dir="temp" failonerror="false" />
131     </target>
132     <target name="clean-gen">
133                 <delete dir="gen" failonerror="false" />
134                 <delete dir="build/gen" failonerror="false" />
135     </target>
136     <target name="clean-cc">
137                 <delete dir="cc/com" failonerror="false" />
138     </target>
139     <target name="clean-war" depends='init, clean' >
140                 <delete dir="${tomcat.home}/webapps/webkell" failonerror="false" />
141                 <delete file="${tomcat.home}/webapps/webkell.war" failonerror="false" />
142     </target>
143     <target name="clean-cactus" depends='init, clean' >
144                 <delete dir="${tomcat.home}/webapps/webkell-cactus" failonerror="false" />
145                 <delete file="${tomcat.home}/webapps/webkell-cactus.war" failonerror="false" />
146     </target>
147         
148     <!-- =============================== -->
149     <!-- CREATE the generated java files -->
150     <!-- =============================== -->
151     <target name="run-gen" >
152                 
153                 <available file="gen/" property="genExists" />
154                 <if name="genExists">
155                         
156                     <else>
157                                 
158                         <mkdir dir="gen/"/>
159                         
160                         <!-- BOB GENERATION --> 
161                                 <java classname="com.interrupt.bob.Main" classpathref="bookkeeping.classpath" fork="yes" >
162                                 
163                                         <!-- <arg line="-gen gen -base . -end .xml -def ${xml.files} -sys ${system.files}" /> --> 
164                                         <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 xml/logs.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 xml/logs.xml'" />
165                                 </java>
166                         
167                     </else>
168                 </if>
169     </target>
170     
171     
172     <!-- =============================== -->
173     <!-- COMPILE targets                 -->
174     <!-- =============================== -->
175     <target name="compile-all" depends="init,run-gen,compile-src,compile-tests"/>
176         
177     <target name="compile-src" depends="init,compile-gen">
178                 
179                 <echo message="COMPILING JAVA SOURCE"/>
180                 <mkdir dir="${dir.build}/src"/>
181                 
182                 <javac srcdir="${dir.src}" destdir="${dir.build}/src" debug="true" fork="yes" >
183                         
184                         <!-- 
185                         -Xlint:deprecation
186                         <compilerarg line="-Xlint" />
187                         <arg value="com.interrupt.bookkeeping.AllTests" />
188                         -->
189                         <classpath>
190                                 <pathelement path="${dir.build}/test" />
191                                 <pathelement path="${dir.build}/gen" />
192                                 <pathelement path="${dir.build}/src" />
193                                 <pathelement path="xml" />
194                                 <fileset dir="${java.home}/lib" >
195                                         <include name="**/*.jar"/>
196                                 </fileset>
197                                 <fileset dir="lib">
198                                         <include name="**/*.jar" />
199                                         <include name="**/*.properties"/>
200                                 </fileset>
201                         </classpath>
202                 </javac>
203                 
204     </target>
205         
206         
207         <target name="run-cc" depends="init"> 
208                 
209         <available file="gen/com/interrupt/bookkeeping/cc/analysis" property="ccExists" />
210                 <if name="ccExists">
211                         
212                     <else>
213                                 
214                         <mkdir dir="gen" />
215                         <sablecc src="cc" outputdirectory="gen" includes="*.grammar" />
216                         
217                         <!-- need to hack the lexer code and there's no easy way to sub-type  
218                         <copy todir="gen/com/interrupt/bookkeeping/cc/lexer/" overwrite="true"> 
219                                 <fileset file="src/com/Lexer.java" /> 
220                         </copy> 
221                         -->
222                 
223                     </else>
224                 </if>
225                 
226         </target>
227         
228         
229     <target name="compile-htest" depends="init">
230         
231         <echo message="COMPILING htest"/>
232         <javac srcdir="htest" destdir="." fork="yes" deprecation="on" >
234             <classpath>
235                 <fileset dir="${java.home}/lib" >
236                     <include name="**/*.jar"/>
237                 </fileset>
238                 <fileset dir="lib">
239                     <include name="**/*.jar" />
240                 </fileset>
241             </classpath>
242         </javac>
243         
244     </target>
245     <target name="run-htest" depends="compile-htest,init">
247         <echo message="RUNNING htest"/>
248         <java classname="Testing" >
250             <classpath>
251                 <pathelement path="." />
252                 <fileset dir="${java.home}/lib" >
253                     <include name="**/*.jar"/>
254                 </fileset>
255                 <fileset dir="lib">
256                     <include name="**/*.jar" />
257                 </fileset>
258             </classpath>
259         </java>
260         
261     </target>
262     
263     <target name="compile-tests" depends="init, compile-src">
264                 
265                 <echo message="COMPILING JAVA TESTS"/>
266                 <mkdir dir="${dir.build}/test"/>
267                 <javac srcdir="${dir.test.src}" destdir="${dir.build}/test" debug="true" deprecation="on" >
268                         
269                         <!-- <compilerarg line="-Xlint" />
270                         -->
271                     <classpath>
272                         <pathelement path="${dir.build}/gen" />
273                         <pathelement path="${dir.build}/src" />
274                         <pathelement path="${dir.build}/test" />
275                         <pathelement path="xml" />
276                         <fileset dir="${java.home}/lib" >
277                             <include name="**/*.jar"/>
278                         </fileset>
279                         <fileset dir="lib">
280                             <include name="**/*.jar" />
281                             <include name="**/*.properties"/>
282                         </fileset>
283                     </classpath>
284                 </javac>
285                 
286     </target>
287         
288     <target name="compile-gen" depends="init,run-gen,run-cc">
289                 
290         
291                 <!-- copy over Token with a toString() that doesn't add extra stuff 
292                 <copy todir="gen/com/interrupt/bookkeeping/cc/node/" overwrite="true"> 
293                         <fileset file="src/com/interrupt/bookkeeping/cc/node/Token.java" /> 
294                 </copy> 
295         -->
296                 
297                 <echo message="COMPILING GEN SOURCE"/>
298                 <mkdir dir="${dir.build}/gen"/>
299                 <javac srcdir="gen" destdir="${dir.build}/gen" fork="yes" debug="true" deprecation="on" >
300                         
301                         <classpath>
302                                 <pathelement path="${dir.build}/src" />
303                                 <pathelement path="${dir.build}/test" />
304                                 <fileset dir="${java.home}/lib" >
305                                     <include name="**/*.jar"/>
306                                 </fileset>
307                                 <fileset dir="lib">
308                                     <include name="**/*.jar" />
309                                     <include name="**/*.properties"/>
310                                 </fileset>
311                     </classpath>
312                 </javac>
313                 
314                 
315                 <!-- copy over SableCC dat files -->
316                 <copy todir="${dir.build}/gen" > 
317                         <fileset dir="gen" includes="**/*.dat" />
318                 </copy> 
319                 
320     </target>
321     
322         
323         
324     <!-- =============================== -->
325     <!-- RUN targets                    -->
326     <!-- =============================== -->
327     <target name="run-tests" depends="compile-tests" >
328                 
329                 <echo message="RUNNING UNIT TESTS in directory:  ${dir.test.src}"/>
330                 <!-- <java classname="junit.textui.TestRunner" classpathref="bookkeeping.classpath" fork="yes" > -->
331                 <java classname="junit.textui.TestRunner" fork="yes" >
332                         
333                         <arg value="com.interrupt.bookkeeping.AllTests" />
334                         
335                         <classpath>
336                                 <pathelement path="${dir.build}/gen" />
337                                 <pathelement path="${dir.build}/src" />
338                                 <pathelement path="${dir.build}/test" />
339                                 <pathelement path="lib/" />
340                                 <pathelement path="xml/" />
341                                 <pathelement path="xml/http/" />
342                                 <pathelement path="test/xml/" />
343                                 <pathelement path="test/xml/http/" />
344                                 <pathelement path="." />
345                                 
346                                 <fileset dir="lib">
347                                     <include name="**/*.jar" />
348                                     <include name="**/*.properties"/>
349                                 </fileset>
350                                 <fileset dir="${java.home}/lib" >
351                                     <include name="**/*.jar"/>
352                                 </fileset>
353                         </classpath>
354                         
355                 </java>
356         
357     </target>
358         
359         <target name="run-test" depends="compile-tests" >
360                 
361                 <echo message="RUNNING a Single UNIT TEST in directory:  ${dir.test.src}"/>
362                 <!-- <java classname="junit.textui.TestRunner" fork="yes" >
363                         
364                         <sysproperty key="db.url" value="xmldb:exist:///db/bookkeeping/" />
365                         <sysproperty key="exist.initdb" value="true" />
366                         <sysproperty key="exist.home" value="." />
367                         <arg value="com.interrupt.bookkeeping.cc.kkell.aauth.TestAAuthentication" />
368                         
369                         <classpath>
370                                 <pathelement path="${dir.build}/gen" />
371                                 <pathelement path="${dir.build}/src" />
372                                 <pathelement path="${dir.build}/test" />
373                                 <pathelement path="lib/" />
374                                 <pathelement path="xml/" />
375                                 <pathelement path="xml/http/" />
376                                 <pathelement path="test/xml/http/" />
377                                 <pathelement path="." />
378                                 <fileset dir="lib">
379                                     <include name="**/*.jar" />
380                                     <include name="**/*.properties"/>
381                                 </fileset>
382                                 <fileset dir="${java.home}/lib" >
383                                     <include name="*.jar"/>
384                                 </fileset>
385                         </classpath>
386                         
387                 </java>
388                 <java classname="junit.textui.TestRunner" fork="yes" >
389                         
390                         <sysproperty key="db.url" value="xmldb:exist:///db/bookkeeping/" />
391                         <sysproperty key="exist.initdb" value="true" />
392                         <sysproperty key="exist.home" value="." />
393                         <arg value="com.interrupt.bookkeeping.TestGeneral" />
394                         <classpath>
395                                 <pathelement path="${dir.build}/gen" />
396                                 <pathelement path="${dir.build}/src" />
397                                 <pathelement path="${dir.build}/test" />
398                                 <pathelement path="lib/" />
399                                 <pathelement path="xml/" />
400                                 <pathelement path="xml/http/" />
401                                 <pathelement path="test/xml/" />
402                                 <pathelement path="test/xml/http/" />
403                                 <pathelement path="." />
404                                 <fileset dir="lib">
405                                     <include name="**/*.jar" />
406                                     <include name="**/*.properties"/>
407                                 </fileset>
408                                 <fileset dir="${java.home}/lib" >
409                                     <include name="*.jar"/>
410                                 </fileset>
411                         </classpath>
412                 </java>
413                 --> 
414                 
415                 <java classname="junit.textui.TestRunner" fork="yes" >
416                         
417                         <sysproperty key="db.url" value="xmldb:exist:///db/bookkeeping/" />
418                         <sysproperty key="exist.initdb" value="true" />
419                         <sysproperty key="exist.home" value="." />
420                         
421                         <sysproperty key="org.xml.sax.features.validation" value="false" />
422                         <sysproperty key="java.endorsed.dirs" value="lib/endorsed" />
423                         
424                         <arg value="com.interrupt.bookkeeping.cc.kkell.TestBKellFunctional" />
425                         <classpath>
426                                 <pathelement path="${dir.build}/gen" />
427                                 <pathelement path="${dir.build}/src" />
428                                 <pathelement path="${dir.build}/test" />
429                                 <pathelement path="lib/" />
430                                 <pathelement path="xml/" />
431                                 <pathelement path="xml/http/" />
432                                 <pathelement path="test/bk/" />
433                                 <pathelement path="test/xml/" />
434                                 <pathelement path="test/xml/http/" />
435                                 <pathelement path="." />
436                                 <fileset dir="lib">
437                                     <include name="**/*.jar" />
438                                     <include name="**/*.properties"/>
439                                 </fileset>
440                                 <fileset dir="${java.home}/lib" >
441                                     <include name="**/*.jar"/>
442                                 </fileset>
443                         </classpath>
444                 </java>
445                 
446     </target>
447         
448         
449         <target name='cactus-deploy' depends='compile-tests, release-war' >
450                 
451                 <echo message="DEPLOYING 'webkell-cactus.war' to ${tomcat.home}/webapps " />
452                 <available file="build/webkell-cactus.war" property="cactusExists" />
453                 <if name="cactusExists">
454                     <else>
455                                 <!-- <cactifywar destfile="build/webkell-cactus.war" srcfile="build/webkell.war" mergewebxml="webmerge.xml" />
456                                 -->
457                                 <cactifywar destfile="build/webkell-cactus.war" srcfile="build/webkell.war" webxml="lib/web.xml" />
458                         </else>
459                 </if>
460                 
461                 
462                 <!-- BEGIN :: Adding cactus specific war file -->
463                 
464                 <!-- create temporary directory to copy war -->
465                 <mkdir dir="build/cactus" />
466                 <copy todir="build/cactus" file="build/webkell-cactus.war" />
467                 
468                 <!-- extract war -->
469                 <exec executable="jar">
470                         <arg value="-xvf"/>
471                         <arg value="build/cactus/webkell-cactus.war"/>
472                 </exec>
473                 
474                 <!-- put extracted war to 'build/cactus' dir -->
475                 <move todir="build/cactus/" >
476                         <fileset dir=".">
477                                 <include name="error.xhtml"/>
478                                 <include name="jspRedirector.jsp"/>
479                                 <include name="webkell.xhtml"/>
480                                 <include name="WEB-IN*/**"/>
481                                 <include name="META-IN*/**"/>
482                         </fileset>
483                 </move>
484                 
485                 <!-- copy 1. cactus web.xml and 2. TestBookkeepingServlet.class -->
486                 <copy tofile="build/cactus/WEB-INF/web.xml" file="lib/web.cactus.xml" overwrite="true"/>
487                 <copy todir="build/cactus/WEB-INF/classes" >
488                         
489                         <fileset dir="build/test" >
490                                 <include name="**/TestBookkeepingServlet.class" />
491                         </fileset>
492                 </copy>
493                 
494                 <delete file="build/cactus/webkell-cactus.war" />
495                 <jar destfile="build/webkell-cactus.war" basedir="build/cactus/" />
496                 <!-- END -->
497                 
498                 
499                 <copy todir="${tomcat.home}/webapps/" 
500                         file="build/webkell-cactus.war" />
501                 
502         </target>
503         <target name="hello" depends="init" >
504                 
505                 <!-- create temporary directory to copy war -->
506                 <mkdir dir="build/cactus" />
507                 <copy todir="build/cactus" file="build/webkell-cactus.war" />
508                 
509                 <!-- extract war -->
510                 <exec executable="jar">
511                         <arg value="-xvf"/>
512                         <arg value="build/cactus/webkell-cactus.war"/>
513                 </exec>
514                 
515                 <!-- put extracted war to 'build/cactus' dir -->
516                 <move todir="build/cactus/" >
517                         <fileset dir=".">
518                                 <include name="error.xhtml"/>
519                                 <include name="jspRedirector.jsp"/>
520                                 <include name="webkell.xhtml"/>
521                                 <include name="WEB-IN*/**"/>
522                                 <include name="META-IN*/**"/>
523                         </fileset>
524                 </move>
525                 
526                 <copy tofile="build/cactus/WEB-INF/web.xml" file="lib/web.cactus.xml" overwrite="true"/>
527                 <delete file="build/cactus/webkell-cactus.war" />
528                 <jar destfile="build/webkell-cactus.war" basedir="build/cactus/" />
529                 
530         </target>
531         
532         <target name='cactus-run' depends='cactus-deploy' >
533                 
534                 <property name="CATALINA_HOME" value="${tomcat.home}" /> 
535                 <property name="CATALINA_BASE" value="${tomcat.home}" /> 
536                 <property name="CATALINA_TMPDIR" value="${tomcat.home}/temp" /> 
537                 <exec executable="${tomcat.home}/bin/setclasspath.sh">
538                 </exec> 
539                 
540                 <cactus warfile="/Users/timothyw/Projects/Bookkeeping/build/webkell-cactus.war"
541                 printsummary="yes" failureproperty="tests.failed">
542                         
543                         <cactusproperty server="false" propertiesFile="build.properties"/>
544                         <classpath >
545                                 <path refid="bookkeeping.classpath"/>
546                         </classpath>
547                         
548                         <containerset>
549                         <cargo containerId="tomcat5x" output="${logs.dir}/output.log" log="${logs.dir}/cargo.log" home="${tomcat.home}">
550                             <configuration>
551                                 <property name="cargo.servlet.port" value="${cargo.servlet.port}"/>
552                                 <property name="cargo.logging" value="${cargo.logging}"/>
553                                 <deployable type="${cactus.sample.archive.type}" file="${cactified.servlet.archive.name}"/>
554                             </configuration>
555                         </cargo>
556                         <!-- <tomcat5x dir="${tomcat.home}" port="8070" /> -->  
557                         </containerset>
558                         
559                         <formatter type="xml"/>
560                         <batchtest>
561                         <fileset dir="${dir.test.src}">
562                                 <!-- <include name="**/CactusTests.java"/> --> 
563                                 <exclude name="**/TestAll.java"/>
564                         </fileset>
565                         </batchtest>
566                 </cactus>
567         </target>
568         
569         
570         <target name='run-class' depends='compile-src' > 
571                 
572                 
573                 <java classname="com.interrupt.bookkeeping.cc.bkell.Bkell" classpathref="bookkeeping.classpath" fork='true' >
574                         
575                         <classpath>
576                                 <pathelement path="${dir.build}/test" />
577                                 <pathelement path="${dir.build}/gen" />
578                                 <pathelement path="${dir.build}/src" />
579                                 <pathelement path="xml" />
580                                 <fileset dir="${java.home}/lib" >
581                                         <include name="**/*.jar"/>
582                                 </fileset>
583                                 <fileset dir="lib">
584                                         <include name="**/*.jar" />
585                                         <include name="**/*.properties"/>
586                                 </fileset>
587                         </classpath>
588                 </java>
589                 
590                 
591                 <!-- <java classname="com.interrupt.persistence.xml.Spittoon" fork="true" >
592                         
593                         <sysproperty key="db.url" value="xmldb:exist:///db/bookkeeping/" />
594                         <sysproperty key="exist.initdb" value="true" />
595                         <sysproperty key="exist.home" value="." />
596                         
597                         <classpath>
598                                 <pathelement path="${dir.build}/gen" />
599                                 <pathelement path="${dir.build}/src" />
600                                 <pathelement path="${dir.build}/test" />
601                                 <pathelement path="lib/" />
602                                 <pathelement path="xml/" />
603                                 <pathelement path="xml/http/" />
604                                 <pathelement path="grammar" />
605                                 <pathelement path="." />
606                                 <fileset dir="lib">
607                                         <include name="**/*.jar" />
608                                         <include name="**/*.properties"/>
609                                 </fileset>
610                                 <fileset dir="${java.home}/lib" >
611                                         <include name="*.jar"/>
612                                 </fileset>
613                         </classpath>
614                 </java>
615                 --> 
616                 
617                 <!-- <java classname="com.interrupt.bookkeeping.http.BookkeepingSystemFacade" fork="true" >
618                 <java classname="com.interrupt.bookkeeping.Deleteme" fork="true" >
619                         
620                         <sysproperty key="db.url" value="xmldb:exist:///db/bookkeeping/" />
621                         <sysproperty key="exist.initdb" value="true" />
622                         <sysproperty key="exist.home" value="." />
623                         
624                         <classpath>
625                                 <pathelement path="${dir.build}/gen" />
626                                 <pathelement path="${dir.build}/src" />
627                                 <pathelement path="${dir.build}/test" />
628                                 <pathelement path="lib/" />
629                                 <pathelement path="xml/" />
630                                 <pathelement path="xml/http/" />
631                                 <pathelement path="test/bk/" />
632                                 <pathelement path="test/xml/" />
633                                 <pathelement path="test/xml/http/" />
634                                 <pathelement path="." />
635                                 <fileset dir="lib">
636                                     <include name="**/*.jar" />
637                                     <include name="**/*.properties"/>
638                                 </fileset>
639                                 <fileset dir="${java.home}/lib" >
640                                     <include name="**/*.jar"/>
641                                 </fileset>
642                         </classpath>
643                 </java>
644                 --> 
645                 
646         </target> 
647         
648         
649     <target name="run-docs" depends="compile-gen" >
650         
651         <javadoc destdir="doc/api" 
652             windowtitle="Bookkeeping API" 
653             sourcepath="src/:gen/"
654             classpathref="bookkeeping.classpath" >
656             <package name="com.interrupt.bookkeeping" />
657             <package name="com.interrupt.bookkeeping.account" />
658             <package name="com.interrupt.bookkeeping.action" />
659                 
660                 <package name="com.interrupt.bookkeeping.cc" />
661                 <package name="com.interrupt.bookkeeping.cc.bkell" />
662                 <package name="com.interrupt.bookkeeping.cc.bkell.command" />
663                 <package name="com.interrupt.bookkeeping.cc.executor" />
664                 <package name="com.interrupt.bookkeeping.cc.analysis" />
665                 <package name="com.interrupt.bookkeeping.cc.lexer" />
666                 <package name="com.interrupt.bookkeeping.cc.parser" />
667                 <package name="com.interrupt.bookkeeping.cc.node" />
668                 
669                 <!-- DELETE 'node' package 
670                 <package name="com.interrupt.bookkeeping.cc.node" />
671                 --> 
672                 
673                 <package name="com.interrupt.bookkeeping.exception" />
674             <package name="com.interrupt.bookkeeping.http" />
676                 <!-- DELETE 'interpreter' package 
677                 <package name="com.interrupt.bookkeeping.interpreter" />
678                 --> 
679                 
680             <package name="com.interrupt.bookkeeping.journal" />
681             <package name="com.interrupt.bookkeeping.system" />
682                 <package name="com.interrupt.bookkeeping.users" />
683                 <package name="com.interrupt.bookkeeping.util" />
684             <package name="com.interrupt.bookkeeping.workflow" />
685             <package name="com.interrupt.persistence" />
686             <package name="com.interrupt.persistence.or" />
687             <package name="com.interrupt.persistence.xml" />
688         </javadoc>
689     </target>
690     
691     
692     <!-- =============================== -->
693     <!-- DEPLOY targets                 -->
694     <!-- =============================== -->
695     
696         <target name="release" depends="compile-src" >
697                 
698                 <!-- jar main classes. Jar dependencies and properties files should be zipped into a lib directory
699                 -->
700                 <jar destfile="${dir.build}/bookkeeping.jar" >
701                         
702                         <fileset dir="${dir.build}/gen" includes="**/*.class" />
703                         <fileset dir="${dir.build}/gen" includes="**/*.dat" />
704                         <fileset dir="${dir.build}/src" includes="**/*.class" />
705                         <!-- <manifest >
706                                 <attribute name="Main-Class" value="com.interrupt.bookkeeping.cc.bkell.Bkell" />
707                                 <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/ " />
708                         </manifest>
709                         -->
710                 </jar>
711                 
712                 
713         </target> 
714         
715         <target name="release-war" depends="init, release" > 
716                 
717                 <echo message="Making webkell.war" />
718                 
719                 <!-- copy libs to a tempporary flattened directory --> 
720                 <mkdir dir="temp" /> 
721                 
722                 <copy file="/Users/timothyw/Tools/eXist-Aauth/conf.xml" tofile="temp/confAauth.xml" flatten="true" /> 
723                 <copy file="/Users/timothyw/Tools/eXist-Groups/conf.xml"  tofile="temp/confGroups.xml" flatten="true" />
724                 <copy todir="temp" flatten="true" > 
725                                 
726                         <fileset dir="." >
727                                 
728                                 <include name="confAauth.xml"/>
729                                 <!-- <include name="confGroups.xml"/>
730                                 -->
731                                 <include name="xml/bookkeeping.system.xml"/>
732                                 <!-- <include name="xml/default.bookkeeping.xml"/> -->
733                         </fileset>
734                         <fileset dir="${dir.lib}" >
735                                 <include name="**/*.jar"/>
736                                 <include name="**/*.properties"/>
737                                 <exclude name="**/spittoon.properties" />
738                                 <exclude name="**/*servlet*.jar" />
739                         </fileset>
740                 </copy> 
741                 <move file="temp/spittoon.web.properties" tofile="temp/spittoon.properties"/>
743                 <war destfile="${dir.build}/webkell.war" webxml="${dir.lib}/web.xml" >
744                         
745                         <fileset dir="webkell" includes="**/*" />
746                         
747                         <!-- <fileset dir="lib" includes="exist-data/**" /> -->
748                         <zipfileset file="dataGroups/**"
749                                 prefix="WEB-INF/lib/dataGroups" />
750                         <zipfileset file="dataAauth/**"
751                                 prefix="WEB-INF/lib/dataAauth" />
752                         
753                         <zipfileset file="xml/*.xml"
754                                 prefix="WEB-INF/xml" />
755             
756                         <!-- <webinf ><includesfile name="lib/exist.conf.xml"/></webinf> 
757                         <zipfileset file="lib/exist-conf.xml"
758                             prefix="WEB-INF"/>
759                         -->
760                         <classes dir="${dir.build}/gen" includes="**/*.class" />
761                         <classes dir="${dir.build}/gen" includes="**/*.dat" />
762                         <classes dir="${dir.build}/src" includes="**/*.class" />
763                         <classes dir="temp" includes="*.properties" />
764                         
765                         
766                         <!-- ** TODO Find a better place to put this. an 'xml' directory that can be added to the classpath --> 
767                         <classes dir="xml/http" includes="**/*.xml" />
768                         <classes dir="xml" file="xml/bookkeeping.system.xml" />
769                         <classes dir="xml" file="xml/default.bookkeeping.xml"/>
770                         
771                         <!-- test classes to include in war 
772                         <classes dir="${dir.build}/test" includes="**/*.class" />
773                         -->
774                         
775                         <!-- <lib dir="lib" fullpath="WEB-INF/lib" > -->
776                         <lib dir="temp" >
777                                 <include name="**/*.jar"/>
778                                 <!-- <include name="**/*.properties"/> -->
779                                 <include name="confAauth.xml" />
780                                 <include name="confGroups.xml" />
781                                 <!-- <include name="bookkeeping.system.xml"/> --> 
782                                 <exclude name="**/*servlet*.jar" />
783                         </lib>
784                         <manifest >
785                                 <attribute name="Class-Path" value="lib/cactus lib/endorsed lib/htmlunit lib/ xml/" />
786                         </manifest>
787                 </war>
788                 
789         </target> 
790         <target name="deploy-war" depends="release-war" > 
791                 
792                 <echo message="Deploying webkell.war" />
793                 <!-- <delete dir="${tomcat.home}/webapps/webkell" failonerror="false" />
794                 <delete file="${tomcat.home}/webapps/webkell.war" failonerror="false" />
795                 -->
796                 <copy file="${dir.build}/webkell.war" todir="${tomcat.home}/webapps" /> 
797                 
798         </target>
799         
800         <!-- <target name="cactus-war" depends="init, release-war" > 
801                 
802                 <echo message="Updating 'webkell.war' for cactus" />
803                 
804                 <!- Adding cactus specific war file ->
805                 <war destfile="${dir.build}/webkell.war" webxml="${dir.lib}/web.cactus.xml" update="true" />
806                 
807         </target> 
808         -->
809         
810         <target name="release-scratch" depends="init" >
811                 
812                 <!-- jar main classes. Jar dependencies and properties files should be zipped into a lib directory
813                 -->
814                 <jar destfile="${dir.build}/bookkeeping.jar" >
815                         
816                         <fileset dir="${dir.build}/gen" includes="**/*.class" />
817                         <fileset dir="${dir.build}/gen" includes="**/*.dat" />
818                         <fileset dir="${dir.build}/src" includes="**/*.class" />
819                         <fileset dir="." includes="xml/*.xml" />
820                         <manifest >
821                                 <attribute name="Main-Class" value="com.interrupt.bookkeeping.cc.bkell.Bkell" />
822                                 <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/ " />
823                         </manifest>
824                 </jar>
825                 
826                 
827         </target> 
828     
829     
830 </project>