root/trunk/calendar3/bldfiles/quickstart-build.xml

Revision 873 (checked in by douglm, 7 years ago)

Calendar3:
Do the same for options as for env: create factory class and interface
Changes to use the new factory class
Changes to the build process - copy public service interface jars to dist for other projects

Line 
1 <?xml version="1.0"?>
2
3 <!-- This is the ant build file for the bedework Calendar quickstart.
4
5      It is imported by the quickstart build.xml ensuring all changes to this file
6      appear in the repository.
7
8      Authors: Mike Douglass   douglm@rpi.edu
9 -->
10
11 <project name="quickstart-build-file" default="usage" basedir=".">
12   <property environment="env"/>
13
14   <property name="org.bedework.project.access"
15             location="${basedir}/access" />
16
17   <property name="org.bedework.project.caldav"
18             location="${basedir}/caldav" />
19
20   <property name="org.bedework.project.caldavTest"
21             location="${basedir}/caldavTest" />
22
23   <property name="org.bedework.calendar.dir"
24             location="${basedir}/calendar3" />
25
26   <property name="org.bedework.project.calendar"
27             location="${basedir}/calendar3" />
28
29   <property name="org.bedework.project.davutil"
30             location="${basedir}/davutil" />
31
32   <property name="org.bedework.project.freebusy"
33             location="${basedir}/freebusy" />
34
35   <property name="org.bedework.project.rpiutil"
36             location="${basedir}/rpiutil" />
37
38   <property name="org.bedework.project.webdav"
39             location="${basedir}/webdav" />
40
41     <!-- ===============================================================
42               Default properties.
43          =============================================================== -->
44
45   <property name="org.bedework.defaultdefs.properties"
46             location="${org.bedework.calendar.dir}/bldfiles/defaultDefs.properties"/>
47
48   <target name="README" depends="init"
49           description="Describe targets and their usage">
50     <loadfile property="org.bedework.README" srcFile="${org.bedework.calendar.dir}/docs/README"/>
51     <echo message="${org.bedework.README}" />
52   </target>
53
54   <target name="usage" depends="init"
55           description="Describe targets and their usage">
56     <echo message="As distributed the package should be ready to go."/>
57     <echo message="Ensure ant is on your path, (a version is in the" />
58     <echo message="package)"/>
59     <echo message=""/>
60     <echo message="First in one window do"/>
61     <echo message="    ant hsqldb"/>
62     <echo message="This will start the hsqldb server ready for the "/>
63     <echo message="application."/>
64     <echo message=""/>
65     <echo message="In another window do"/>
66     <echo message="    ant tomcatstart"/>
67     <echo message=""/>
68     <echo message="Once tomcat is running you should be able to go to a"/>
69     <echo message="browser and connect to"/>
70     <echo message="    http://localhost:8080/bedework"/>
71     <echo message="and follow the instructions."/>
72     <echo message=""/>
73     <echo message="To build the calendar do"/>
74     <echo message="    ant deploy    or "/>
75     <echo message="    ant deploy.debug "/>
76     <echo message="which does a build and deploy of all components"/>
77     <echo message=""/>
78     <echo message="To rebuild the calendar do"/>
79     <echo message="    ant clean.deploy    or "/>
80     <echo message="    ant clean.deploy.debug "/>
81     <echo message="which does a clean, build and deploy of all components"/>
82     <echo message=""/>
83     <echo message="See documentation in the docs directory or on bedework.org"/>
84     <echo message="for instructions on creating a locally configured calendar application"/>
85     <echo message=""/>
86   </target>
87
88    <!-- The only properties set below should be those directly used to
89         invoke the targets below, in this file.
90         Do not set properties here for tasks invoked in other build
91         files.  Instead, make sure the targets work in calendar/build.xml,
92         then invoke ant on the task in calendar/build.xml.
93
94         For an example, of invoking ant on another build file,
95         see the deploy target, below.
96      -->
97   <target name="init" >
98     <dirname property="quickstart.dir" file="${ant.file}"/>
99
100     <property name="calendar.build.file"
101               location="${org.bedework.calendar.dir}/build.xml" />
102
103     <property name="org.bedework.freebusy.build.file"
104               location="${org.bedework.project.freebusy}/build.xml" />
105
106     <!-- Overriding this when invoking ant allows different user property
107          files to be included e.g.
108             ant -Dorg.bedework.user.build.properties=/home/me/bedework.properties ...
109             -->
110     <property name="org.bedework.user.build.properties"
111               location="${user.home}/bedework.build.properties" />
112
113     <echo message="Load user properties from ${org.bedework.user.build.properties}" />
114
115     <!-- Load user property definition overrides -->
116     <property file="${org.bedework.user.build.properties}" />
117
118     <property name="org.bedework.build.caldav" value="yes" />
119
120     <condition property="org.bedework.qs.build.caldav">
121       <equals arg1="yes" arg2="${org.bedework.build.caldav}"/>
122     </condition>
123
124     <property name="org.bedework.build.freebusy" value="no" />
125
126     <condition property="org.bedework.qs.build.freebusy">
127       <equals arg1="yes" arg2="${org.bedework.build.freebusy}"/>
128     </condition>
129
130     <!-- ===============================================================
131               Default properties.
132          =============================================================== -->
133     <property file="${org.bedework.defaultdefs.properties}" />
134
135     <property name="sync4j.dir"
136               location="${basedir}/Sync4j2.2b3" />
137   </target>
138
139   <!-- =================================================================
140        Targets to build sub-projects and copy the results into a common library
141        (for the moment use the calendar lib as the common library)
142        ================================================================= -->
143
144   <!-- .................................................................
145                           access
146        .................................................................. -->
147   <target name="build.access" depends="init"
148           description="builds the access project">
149     <ant antfile="${org.bedework.project.access}/build.xml" inheritrefs="true"
150            target="build-all" />
151
152     <antcall target="copy.access" inheritrefs="true" />
153   </target>
154
155   <target name="clean.build.access" depends="init"
156           description="builds the access project">
157     <ant antfile="${org.bedework.project.access}/build.xml" inheritrefs="true"
158            target="clean-build-all" />
159
160     <antcall target="copy.access" inheritrefs="true" />
161   </target>
162
163   <target name="copy.access" >
164     <copy todir="${org.bedework.project.calendar}/lib" overwrite="yes">
165       <fileset dir="${org.bedework.project.access}/dist">
166         <include name="*.jar" />
167       </fileset>
168     </copy>
169     <copy todir="${org.bedework.project.davutil}/lib" overwrite="yes">
170       <fileset dir="${org.bedework.project.access}/dist">
171         <include name="*.jar" />
172       </fileset>
173     </copy>
174   </target>
175
176   <!-- .................................................................
177                           caldav
178        .................................................................. -->
179   <target name="build.caldav" depends="init"
180           description="builds the caldav project">
181     <ant antfile="${org.bedework.project.caldav}/build.xml" inheritrefs="true"
182            target="build-all" />
183
184     <antcall target="copy.caldav" inheritrefs="true" />
185   </target>
186
187   <target name="clean.caldav" depends="init"
188           description="clean the caldav project">
189     <ant antfile="${org.bedework.project.caldav}/build.xml" inheritrefs="true"
190            target="clean" />
191
192     <antcall target="copy.caldav" inheritrefs="true" />
193   </target>
194
195   <target name="clean.build.caldav" depends="init"
196           description="builds the caldav project">
197     <ant antfile="${org.bedework.project.caldav}/build.xml" inheritrefs="true"
198            target="clean-build-all" />
199   </target>
200
201   <target name="copy.caldav" >
202     <copy todir="${org.bedework.project.calendar}/lib" overwrite="yes" failonerror="false" >
203       <fileset dir="${org.bedework.project.caldav}/dist">
204         <include name="*.jar" />
205       </fileset>
206     </copy>
207   </target>
208
209   <!-- .................................................................
210                           caldavTest
211        .................................................................. -->
212   <target name="build.caldavTest" depends="init"
213           description="builds the caldavTest project">
214     <ant antfile="${org.bedework.project.caldavTest}/build.xml" inheritrefs="true"
215            target="build-all" />
216   </target>
217
218   <target name="clean.build.caldavTest" depends="init"
219           description="builds the caldavTest project">
220     <ant antfile="${org.bedework.project.caldavTest}/build.xml" inheritrefs="true"
221            target="clean-build-all" />
222   </target>
223
224   <!-- .................................................................
225                           freebusy
226        .................................................................. -->
227   <target name="build.freebusy" depends="init"
228           description="builds the freebusy project">
229     <ant antfile="${org.bedework.project.freebusy}/build.xml" inheritrefs="true"
230            target="build-all" />
231
232     <antcall target="copy.freebusy" inheritrefs="true" />
233   </target>
234
235   <target name="clean.build.freebusy" depends="init"
236           description="builds the freebusy project">
237     <ant antfile="${org.bedework.project.freebusy}/build.xml" inheritrefs="true"
238            target="build-all" />
239
240     <antcall target="copy.freebusy" inheritrefs="true" />
241   </target>
242
243   <target name="copy.freebusy" >
244     <copy todir="${org.bedework.project.calendar}/lib" overwrite="yes">
245       <fileset dir="${org.bedework.project.freebusy}/dist">
246         <include name="*.jar" />
247       </fileset>
248     </copy>
249   </target>
250
251   <!-- .................................................................
252                           davutil
253        .................................................................. -->
254   <target name="build.davutil" depends="init"
255           description="builds the davutil project">
256     <ant antfile="${org.bedework.project.davutil}/build.xml" inheritrefs="true"
257            target="build-all" />
258
259     <antcall target="copy.davutil" inheritrefs="true" />
260   </target>
261
262   <target name="clean.build.davutil" depends="init"
263           description="builds the davutil project">
264     <ant antfile="${org.bedework.project.davutil}/build.xml" inheritrefs="true"
265            target="clean-build-all" />
266
267     <antcall target="copy.davutil" inheritrefs="true" />
268   </target>
269
270   <target name="copy.davutil" >
271     <copy todir="${org.bedework.project.caldavTest}/lib" overwrite="yes">
272       <fileset dir="${org.bedework.project.davutil}/dist">
273         <include name="*.jar" />
274       </fileset>
275     </copy>
276
277     <copy todir="${org.bedework.project.calendar}/lib" overwrite="yes">
278       <fileset dir="${org.bedework.project.davutil}/dist">
279         <include name="*.jar" />
280       </fileset>
281     </copy>
282
283     <copy todir="${org.bedework.project.webdav}/lib" overwrite="yes">
284       <fileset dir="${org.bedework.project.davutil}/dist">
285         <include name="*.jar" />
286       </fileset>
287     </copy>
288   </target>
289
290   <!-- .................................................................
291                           rpiutil
292        .................................................................. -->
293   <target name="build.rpiutil" depends="init"
294           description="builds the rpiutil project">
295     <ant antfile="${org.bedework.project.rpiutil}/build.xml" inheritrefs="true"
296            target="build-all" />
297
298     <antcall target="copy.rpiutil" inheritrefs="true" />
299   </target>
300
301   <target name="clean.build.rpiutil" depends="init"
302           description="builds the rpiutil project">
303     <ant antfile="${org.bedework.project.rpiutil}/build.xml" inheritrefs="true"
304            target="clean-build-all" />
305
306     <antcall target="copy.rpiutil" inheritrefs="true" />
307   </target>
308
309   <target name="copy.rpiutil" >
310     <copy todir="${org.bedework.project.access}/lib" overwrite="yes">
311       <fileset dir="${org.bedework.project.rpiutil}/dist">
312         <include name="*.jar" />
313       </fileset>
314     </copy>
315
316     <copy todir="${org.bedework.project.calendar}/lib" overwrite="yes">
317       <fileset dir="${org.bedework.project.rpiutil}/dist">
318         <include name="*.jar" />
319       </fileset>
320     </copy>
321
322     <copy todir="${org.bedework.project.davutil}/lib" overwrite="yes">
323       <fileset dir="${org.bedework.project.rpiutil}/dist">
324         <include name="*.jar" />
325       </fileset>
326     </copy>
327
328     <copy todir="${org.bedework.project.webdav}/lib" overwrite="yes">
329       <fileset dir="${org.bedework.project.rpiutil}/dist">
330         <include name="*.jar" />
331       </fileset>
332     </copy>
333   </target>
334
335   <!-- .................................................................
336                           webdav
337        .................................................................. -->
338   <target name="build.webdav" depends="init"
339           description="builds the webdav project">
340     <ant antfile="${org.bedework.project.webdav}/build.xml" inheritrefs="true"
341            target="build-all" />
342
343     <antcall target="copy.webdav" inheritrefs="true" />
344   </target>
345
346   <target name="clean.build.webdav" depends="init"
347           description="builds the webdav project">
348     <ant antfile="${org.bedework.project.webdav}/build.xml" inheritrefs="true"
349            target="clean-build-all" />
350
351     <antcall target="copy.webdav" inheritrefs="true" />
352   </target>
353
354   <target name="clean.webdav" depends="init"
355           description="cleans the webdav project">
356     <ant antfile="${org.bedework.project.webdav}/build.xml" inheritrefs="true"
357            target="clean" />
358   </target>
359
360   <target name="copy.webdav" >
361     <copy todir="${org.bedework.project.calendar}/lib" overwrite="yes">
362       <fileset dir="${org.bedework.project.webdav}/dist">
363         <include name="*.jar" />
364       </fileset>
365     </copy>
366   </target>
367
368   <!-- =================================================================
369        The "build" target builds the jar files
370        ================================================================= -->
371
372   <target name="build" depends="init"
373           description="builds the jars">
374     <ant antfile="${calendar.build.file}" inheritrefs="true"
375            target="bld.all" />
376   </target>
377
378   <target name="clean.build" depends="clean"
379           description="cleans then builds the jars">
380     <ant antfile="${calendar.build.file}" inheritrefs="true"
381            target="bld.all" />
382   </target>
383
384   <!-- =================================================================
385        The "build.freebusy.if" target conditionally builds the freebusy jar files
386        ================================================================= -->
387
388   <target name="build.freebusy.if" depends="init"
389           description="builds the jars" if="org.bedework.qs.build.freebusy" >
390     <antcall inheritrefs="true" target="build.freebusy" />
391   </target>
392
393   <target name="clean.freebusy.if" depends="init" if="org.bedework.qs.build.freebusy" >
394   </target>
395
396   <!-- =================================================================
397        The "XXX.caldav.if" target conditionally executes the caldav targets
398        ================================================================= -->
399
400   <target name="build.caldav.if" depends="init"
401           description="builds the jars" if="org.bedework.qs.build.caldav" >
402     <antcall inheritrefs="true" target="build.caldav" />
403   </target>
404
405   <target name="clean.caldav.if" depends="init"
406           description="cleans jars" if="org.bedework.qs.build.caldav" >
407     <antcall inheritrefs="true" target="clean.caldav" />
408   </target>
409
410   <!-- =================================================================
411        The "XXX.webdav.if" target conditionally executes the webdav targets
412        (needed for caldav)
413        ================================================================= -->
414
415   <target name="build.webdav.if" depends="init"
416           description="builds the jars" if="org.bedework.qs.build.caldav" >
417     <antcall inheritrefs="true" target="build.webdav" />
418   </target>
419
420   <target name="clean.webdav.if" depends="init"
421           description="cleans jars" if="org.bedework.qs.build.caldav" >
422     <antcall inheritrefs="true" target="clean.webdav" />
423   </target>
424
425   <!-- =================================================================
426        The "deploy" target builds and deploys the applications
427        ================================================================= -->
428
429   <target name="deploy" depends="build,build.webdav.if,build.caldav.if,build.freebusy.if"
430           description="builds and deploys the applications">
431     <ant antfile="${calendar.build.file}" inheritrefs="true"
432            target="deploy.nobuild" />
433   </target>
434
435   <target name="deploy.debug" depends="build,build.webdav.if,build.caldav.if,build.freebusy.if"
436           description="builds and deploys the applications">
437     <ant antfile="${calendar.build.file}" inheritrefs="true"
438            target="deploy.debug.nobuild" />
439   </target>
440
441   <!-- =================================================================
442        The "clean.deploy" target cleans, builds and deploys the applications
443        ================================================================= -->
444
445   <target name="clean.deploy" depends="clean,deploy" />
446
447   <target name="clean.deploy.debug" depends="clean,deploy.debug" />
448
449   <target name="clean" depends="init,clean.webdav.if,clean.caldav.if,clean.freebusy.if"
450           description="Remove all generated files.">
451     <ant antfile="${calendar.build.file}" inheritrefs="true"
452            target="clean" />
453   </target>
454
455   <!-- =================================================================
456        The "build.configured" target builds configured applications
457        ================================================================= -->
458
459   <target name="build.configured" depends="init"
460           description="Build configured applications" >
461     <ant antfile="${calendar.build.file}" inheritrefs="true"
462            target="build.configured" />
463   </target>
464
465   <target name="build.configured.debug" depends="init"
466           description="Build configured applications" >
467     <ant antfile="${calendar.build.file}" inheritrefs="true"
468            target="build.configured.debug" />
469   </target>
470
471   <target name="clean.build.configured" depends="clean"
472           description="Build configured applications" >
473     <ant antfile="${calendar.build.file}" inheritrefs="true"
474            target="build.configured" />
475   </target>
476
477   <target name="clean.build.configured.debug" depends="clean"
478           description="Build configured applications" >
479     <ant antfile="${calendar.build.file}" inheritrefs="true"
480            target="build.configured.debug" />
481   </target>
482
483   <!-- =================================================================
484        dump and restore targets
485        ================================================================= -->
486
487   <target name="dumpdb" >
488     <echo message="===============================================================" />
489     <echo message=" use the zipped dump/restore utility to dump, restore or initialise" />
490     <echo message=" the system The default build places it in the dist directory," />
491     <echo message=" instructions for use are in the quickstart documentation" />
492     <echo message="===============================================================" />
493   </target>
494
495   <target name="restoredb" depends="dumpdb"/>
496
497   <target name="initdb" depends="dumpdb"/>
498
499   <target name="tzconvert" depends="build"
500           description="Convert timezones for use in bedework">
501     <ant antfile="${calendar.build.file}" inheritrefs="true"
502          target="tzconvert" />
503   </target>
504
505   <target name="bld.config" depends="init"
506           description="Build config and deploy module">
507     <ant antfile="${calendar.build.file}" inheritrefs="true"
508            target="bld.config" />
509   </target>
510
511   <!-- =================================================================
512        Build and run the unit test suite
513        ================================================================= -->
514
515   <target name="bld.test" depends="init"
516           description="Build and run tests">
517     <ant antfile="${calendar.build.file}" inheritrefs="true"
518          target="bld.test" />
519   </target>
520
521   <target name="run.test" depends="init"
522           description="Build and run tests">
523     <ant antfile="${calendar.build.file}" inheritrefs="true"
524          target="run.test" />
525   </target>
526
527   <target name="run.test.debug" depends="init"
528           description="Build and run tests">
529     <ant antfile="${calendar.build.file}" inheritrefs="true"
530          target="run.test"  >
531       <property name="org.bedework.debug" value="yes" />
532     </ant>
533   </target>
534
535   <!-- Rebuild the http test suite only -->
536   <target name="httptest" depends="init"
537           description="Run httptest suite" >
538     <input message="httptest may destroy this calendar db. Proceed with test"
539            validargs="y,n"
540            addproperty="do.httptest" />
541     <condition property="do.abort">
542       <equals arg1="n" arg2="${do.httptest}"/>
543     </condition>
544     <fail if="do.abort">httptest aborted by user.</fail>
545
546     <ant antfile="${calendar.build.file}" inheritrefs="true"
547            target="bld.httptest" />
548
549     <ant antfile="${calendar.build.file}" inheritrefs="true"
550            target="run.httptest" />
551   </target>
552
553   <!-- =================================================================
554        Run the synchml test application
555        ================================================================= -->
556
557   <target name="synchmltest" depends="init"
558           description="Run the synchml test application" >
559     <input message="synchmltest may destroy this calendar db. Proceed with test"
560            validargs="y,n"
561            addproperty="do.synchmltest" />
562     <condition property="do.abort">
563       <equals arg1="n" arg2="${do.synchmltest}"/>
564     </condition>
565     <fail if="do.abort">synchmltest aborted by user.</fail>
566
567     <ant antfile="${calendar.build.file}" inheritrefs="true"
568            target="synchmltest" />
569   </target>
570
571   <!-- ======================== schema target =======================
572        This builds the ddl from the hibernate schema
573        ================================================================= -->
574
575   <target name="schema" depends="init"
576           description="Generate schema from mapping files">
577     <ant antfile="${calendar.build.file}" inheritrefs="true"
578            target="schema" />
579   </target>
580
581   <!-- ======================== javadoc target =======================
582        ================================================================= -->
583
584   <target name="javadoc" depends="init"
585           description="Generate javadoc">
586     <ant antfile="${calendar.build.file}" inheritrefs="true"
587            target="javadoc" />
588   </target>
589
590   <!-- =================================================================
591        The "hsqldb" target starts the hsqldb server
592        ================================================================= -->
593
594   <target name="hsqldb" depends="init"
595           description="starts the hsqldb server">
596     <echo message="Starting hsqldb"/>
597     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
598       <classpath>
599         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
600       </classpath>
601       <arg value="-database"/>
602       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.dbname}"/>
603       <arg value="-port"/>
604       <arg value="8887"/>
605     </java>
606   </target>
607
608   <target name="hsqldb-trace" depends="init"
609           description="starts the hsqldb server">
610     <echo message="Starting hsqldb"/>
611     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
612       <classpath>
613         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
614       </classpath>
615       <arg value="-trace"/>
616       <arg value="true"/>
617       <arg value="-silent"/>
618       <arg value="false"/>
619       <arg value="-database"/>
620       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.dbname}"/>
621       <arg value="-port"/>
622       <arg value="8887"/>
623     </java>
624   </target>
625
626   <target name="uportaldb" depends="init"
627           description="starts the hsqldb server">
628     <echo message="Starting hsqldb"/>
629     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
630       <classpath>
631         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
632       </classpath>
633       <arg value="-database"/>
634       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.uportal2.dbname}"/>
635       <arg value="-port"/>
636       <arg value="9887"/>
637     </java>
638   </target>
639
640   <!-- =================================================================
641        The "hsqldb-test" target starts the hsqldb server for testing
642        ================================================================= -->
643
644   <target name="hsqldb-test" depends="init"
645           description="starts the hsqldb server for testing">
646     <echo message="Starting hsqldb for testing"/>
647     <delete dir="${org.bedework.hsqldb.dbdir}" />
648
649     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
650       <classpath>
651         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
652       </classpath>
653       <arg value="-database"/>
654       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.test.dbdir}/events"/>
655       <arg value="-port"/>
656       <arg value="8887"/>
657     </java>
658   </target>
659
660   <target name="hsqldb-test-trace" depends="init"
661           description="starts the hsqldb server for testing">
662     <echo message="Starting hsqldb for testing"/>
663     <delete dir="${org.bedework.hsqldb.dbdir}" />
664
665     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
666       <classpath>
667         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
668       </classpath>
669       <arg value="-trace"/>
670       <arg value="true"/>
671       <arg value="-silent"/>
672       <arg value="false"/>
673       <arg value="-database"/>
674       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.test.dbdir}/events"/>
675       <arg value="-port"/>
676       <arg value="8887"/>
677     </java>
678   </target>
679
680   <!-- =================================================================
681        The "hsqldb-mngr" target runs the DatabaseManager class which
682        provides a gui interface to the running hsqldb database.
683        ================================================================= -->
684
685   <target name="hsqldb-mngr" depends="init"
686           description="Runs the DatabaseManager class which provides a
687                        gui interface to the running hsqldb database">
688     <echo message="Starting hsqldb DatabaseManager"/>
689     <echo message="Select type: HSQL Database Engine Server"/>
690     <echo message="Set the URL to jdbc:hsqldb:hsql://localhost:8887"/>
691     <java fork="true" dir="${basedir}"
692           classname="org.hsqldb.util.DatabaseManager">
693       <classpath>
694         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
695       </classpath>
696     </java>
697   </target>
698
699   <!-- =================================================================
700        The "tomcatstart" target starts Tomcat
701        ================================================================= -->
702
703   <target name="tomcatstart-locale" depends="init"
704           description="starts the tomcat server">
705     <input message="Enter language code: "
706            addproperty="tomcat.locale" />
707
708     <input message="Enter country code: "
709            addproperty="tomcat.country" />
710
711     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
712     <java fork="true" dir="${basedir}"
713           classname="org.apache.catalina.startup.Bootstrap">
714       <classpath>
715         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
716       </classpath>
717       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
718       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
719       <jvmarg value="-Duser.language=${tomcat.locale}"/>
720       <jvmarg value="-Duser.country=${tomcat.country}"/>
721       <!--
722       <jvmarg value="-Dfile.encoding=ISO-8859-1"/>
723       -->
724       <arg value="start"/>
725     </java>
726   </target>
727
728   <target name="tomcatstart" depends="init"
729           description="starts the tomcat server">
730     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
731     <java fork="true" dir="${basedir}"
732           classname="org.apache.catalina.startup.Bootstrap">
733       <classpath>
734         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
735       </classpath>
736       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
737       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
738       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
739       <arg value="start"/>
740     </java>
741   </target>
742
743   <target name="tomcatstart-profile" depends="init"
744           description="starts the tomcat server with rpofiling">
745     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
746     <java fork="true" dir="${basedir}"
747           classname="org.apache.catalina.startup.Bootstrap">
748       <classpath>
749         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
750       </classpath>
751       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
752       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
753       <jvmarg value="-Xrunyjpagent:cpu=times,onexit=cpu" />
754       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
755       <arg value="start"/>
756     </java>
757   </target>
758
759   <target name="tomcatstart-profile-large" depends="init"
760           description="starts the tomcat server with rpofiling">
761     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
762     <java fork="true" dir="${basedir}"
763           classname="org.apache.catalina.startup.Bootstrap">
764       <classpath>
765         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
766       </classpath>
767       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
768       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
769       <jvmarg value="-Xms128m" />
770       <jvmarg value="-Xmx630m" />
771       <!--
772       <jvmarg value="-XX:PermSize=128m" />
773       <jvmarg value="-XX:MaxPermSize=128m" />
774       -->
775       <jvmarg value="-server" />
776       <jvmarg value="-Xrunyjpagent:cpu=times,onexit=cpu" />
777       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
778       <arg value="start"/>
779     </java>
780   </target>
781
782   <target name="tomcatstart-debug" depends="init"
783           description="starts the tomcat server with remote debugging enabled">
784     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
785     <java fork="true" dir="${basedir}"
786           classname="org.apache.catalina.startup.Bootstrap">
787       <classpath>
788         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
789       </classpath>
790       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
791       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
792       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
793       <jvmarg value="-Xdebug"/>
794       <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"/>
795       <arg value="start"/>
796     </java>
797   </target>
798
799   <!-- This target is for use when sync4j is installed -->
800   <target name="tomcatstart-sync4j" depends="init"
801           description="starts the tomcat server with sync4j">
802     <echo message="Starting Tomcat 5.0.16 with sync4j"/>
803     <java fork="true" dir="${basedir}"
804           classname="org.apache.catalina.startup.Bootstrap">
805       <classpath>
806         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
807       </classpath>
808       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
809       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
810       <jvmarg value="-Dsync4j.home=${sync4j.dir}"/>
811       <arg value="start"/>
812     </java>
813   </target>
814
815   <!-- =================================================================
816        The "tomcatstop" target stops Tomcat cleanly
817        ================================================================= -->
818
819   <target name="tomcatstop" depends="init">
820     <echo message="Stopping Tomcat 5.0.16"/>
821     <java fork="true" dir="${basedir}"
822           classname="org.apache.catalina.startup.Bootstrap">
823       <classpath>
824         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
825       </classpath>
826       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
827       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
828       <arg value="stop"/>
829     </java>
830   </target>
831 </project>
Note: See TracBrowser for help on using the browser.