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