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

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

--

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   </target>
232
233   <target name="clean.build.freebusy" depends="init"
234           description="builds the freebusy project">
235     <ant antfile="${org.bedework.project.freebusy}/build.xml" inheritrefs="true"
236            target="build-all" />
237   </target>
238
239   <!-- .................................................................
240                           davutil
241        .................................................................. -->
242   <target name="build.davutil" depends="init"
243           description="builds the davutil project">
244     <ant antfile="${org.bedework.project.davutil}/build.xml" inheritrefs="true"
245            target="build-all" />
246
247     <antcall target="copy.davutil" inheritrefs="true" />
248   </target>
249
250   <target name="clean.build.davutil" depends="init"
251           description="builds the davutil project">
252     <ant antfile="${org.bedework.project.davutil}/build.xml" inheritrefs="true"
253            target="clean-build-all" />
254
255     <antcall target="copy.davutil" inheritrefs="true" />
256   </target>
257
258   <target name="copy.davutil" >
259     <copy todir="${org.bedework.project.caldavTest}/lib" overwrite="yes">
260       <fileset dir="${org.bedework.project.davutil}/dist">
261         <include name="*.jar" />
262       </fileset>
263     </copy>
264
265     <copy todir="${org.bedework.project.calendar}/lib" overwrite="yes">
266       <fileset dir="${org.bedework.project.davutil}/dist">
267         <include name="*.jar" />
268       </fileset>
269     </copy>
270
271     <copy todir="${org.bedework.project.webdav}/lib" overwrite="yes">
272       <fileset dir="${org.bedework.project.davutil}/dist">
273         <include name="*.jar" />
274       </fileset>
275     </copy>
276   </target>
277
278   <!-- .................................................................
279                           rpiutil
280        .................................................................. -->
281   <target name="build.rpiutil" depends="init"
282           description="builds the rpiutil project">
283     <ant antfile="${org.bedework.project.rpiutil}/build.xml" inheritrefs="true"
284            target="build-all" />
285
286     <antcall target="copy.rpiutil" inheritrefs="true" />
287   </target>
288
289   <target name="clean.build.rpiutil" depends="init"
290           description="builds the rpiutil project">
291     <ant antfile="${org.bedework.project.rpiutil}/build.xml" inheritrefs="true"
292            target="clean-build-all" />
293
294     <antcall target="copy.rpiutil" inheritrefs="true" />
295   </target>
296
297   <target name="copy.rpiutil" >
298     <copy todir="${org.bedework.project.access}/lib" overwrite="yes">
299       <fileset dir="${org.bedework.project.rpiutil}/dist">
300         <include name="*.jar" />
301       </fileset>
302     </copy>
303
304     <copy todir="${org.bedework.project.calendar}/lib" overwrite="yes">
305       <fileset dir="${org.bedework.project.rpiutil}/dist">
306         <include name="*.jar" />
307       </fileset>
308     </copy>
309
310     <copy todir="${org.bedework.project.davutil}/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.webdav}/lib" overwrite="yes">
317       <fileset dir="${org.bedework.project.rpiutil}/dist">
318         <include name="*.jar" />
319       </fileset>
320     </copy>
321   </target>
322
323   <!-- .................................................................
324                           webdav
325        .................................................................. -->
326   <target name="build.webdav" depends="init"
327           description="builds the webdav project">
328     <ant antfile="${org.bedework.project.webdav}/build.xml" inheritrefs="true"
329            target="build-all" />
330
331     <antcall target="copy.webdav" inheritrefs="true" />
332   </target>
333
334   <target name="clean.build.webdav" depends="init"
335           description="builds the webdav project">
336     <ant antfile="${org.bedework.project.webdav}/build.xml" inheritrefs="true"
337            target="clean-build-all" />
338
339     <antcall target="copy.webdav" inheritrefs="true" />
340   </target>
341
342   <target name="clean.webdav" depends="init"
343           description="cleans the webdav project">
344     <ant antfile="${org.bedework.project.webdav}/build.xml" inheritrefs="true"
345            target="clean" />
346   </target>
347
348   <target name="copy.webdav" >
349     <copy todir="${org.bedework.project.calendar}/lib" overwrite="yes">
350       <fileset dir="${org.bedework.project.webdav}/dist">
351         <include name="*.jar" />
352       </fileset>
353     </copy>
354   </target>
355
356   <!-- =================================================================
357        The "build" target builds the jar files
358        ================================================================= -->
359
360   <target name="build" depends="init"
361           description="builds the jars">
362     <ant antfile="${calendar.build.file}" inheritrefs="true"
363            target="bld.all" />
364   </target>
365
366   <target name="clean.build" depends="clean"
367           description="cleans then builds the jars">
368     <ant antfile="${calendar.build.file}" inheritrefs="true"
369            target="bld.all" />
370   </target>
371
372   <!-- =================================================================
373        The "build.freebusy.if" target conditionally builds the freebusy jar files
374        ================================================================= -->
375
376   <target name="build.freebusy.if" depends="init"
377           description="builds the jars" if="org.bedework.qs.build.freebusy" >
378     <antcall inheritrefs="true" target="build.freebusy" />
379   </target>
380
381   <target name="clean.freebusy.if" depends="init" if="org.bedework.qs.build.freebusy" >
382   </target>
383
384   <!-- =================================================================
385        The "XXX.caldav.if" target conditionally executes the caldav targets
386        ================================================================= -->
387
388   <target name="build.caldav.if" depends="init"
389           description="builds the jars" if="org.bedework.qs.build.caldav" >
390     <antcall inheritrefs="true" target="build.caldav" />
391   </target>
392
393   <target name="clean.caldav.if" depends="init"
394           description="cleans jars" if="org.bedework.qs.build.caldav" >
395     <antcall inheritrefs="true" target="clean.caldav" />
396   </target>
397
398   <!-- =================================================================
399        The "XXX.webdav.if" target conditionally executes the webdav targets
400        (needed for caldav)
401        ================================================================= -->
402
403   <target name="build.webdav.if" depends="init"
404           description="builds the jars" if="org.bedework.qs.build.caldav" >
405     <antcall inheritrefs="true" target="build.webdav" />
406   </target>
407
408   <target name="clean.webdav.if" depends="init"
409           description="cleans jars" if="org.bedework.qs.build.caldav" >
410     <antcall inheritrefs="true" target="clean.webdav" />
411   </target>
412
413   <!-- =================================================================
414        The "deploy" target builds and deploys the applications
415        ================================================================= -->
416
417   <target name="deploy" depends="build,build.webdav.if,build.caldav.if,build.freebusy.if"
418           description="builds and deploys the applications">
419     <ant antfile="${calendar.build.file}" inheritrefs="true"
420            target="deploy.nobuild" />
421   </target>
422
423   <target name="deploy.debug" depends="build,build.webdav.if,build.caldav.if,build.freebusy.if"
424           description="builds and deploys the applications">
425     <ant antfile="${calendar.build.file}" inheritrefs="true"
426            target="deploy.debug.nobuild" />
427   </target>
428
429   <!-- =================================================================
430        The "clean.deploy" target cleans, builds and deploys the applications
431        ================================================================= -->
432
433   <target name="clean.deploy" depends="clean,deploy" />
434
435   <target name="clean.deploy.debug" depends="clean,deploy.debug" />
436
437   <target name="clean" depends="init,clean.freebusy.if"
438           description="Remove all generated files.">
439     <ant antfile="${calendar.build.file}" inheritrefs="true"
440            target="clean" />
441   </target>
442
443   <!-- =================================================================
444        The "build.configured" target builds configured applications
445        ================================================================= -->
446
447   <target name="build.configured" depends="init"
448           description="Build configured applications" >
449     <ant antfile="${calendar.build.file}" inheritrefs="true"
450            target="build.configured" />
451   </target>
452
453   <target name="build.configured.debug" depends="init"
454           description="Build configured applications" >
455     <ant antfile="${calendar.build.file}" inheritrefs="true"
456            target="build.configured.debug" />
457   </target>
458
459   <target name="clean.build.configured" depends="clean"
460           description="Build configured applications" >
461     <ant antfile="${calendar.build.file}" inheritrefs="true"
462            target="build.configured" />
463   </target>
464
465   <target name="clean.build.configured.debug" depends="clean"
466           description="Build configured applications" >
467     <ant antfile="${calendar.build.file}" inheritrefs="true"
468            target="build.configured.debug" />
469   </target>
470
471   <!-- =================================================================
472        dump and restore targets
473        ================================================================= -->
474
475   <target name="dumpdb" >
476     <echo message="===============================================================" />
477     <echo message=" use the zipped dump/restore utility to dump, restore or initialise" />
478     <echo message=" the system The default build places it in the dist directory," />
479     <echo message=" instructions for use are in the quickstart documentation" />
480     <echo message="===============================================================" />
481   </target>
482
483   <target name="restoredb" depends="dumpdb"/>
484
485   <target name="initdb" depends="dumpdb"/>
486
487   <target name="tzconvert" depends="build"
488           description="Convert timezones for use in bedework">
489     <ant antfile="${calendar.build.file}" inheritrefs="true"
490          target="tzconvert" />
491   </target>
492
493   <target name="bld.config" depends="init"
494           description="Build config and deploy module">
495     <ant antfile="${calendar.build.file}" inheritrefs="true"
496            target="bld.config" />
497   </target>
498
499   <!-- =================================================================
500        Build and run the unit test suite
501        ================================================================= -->
502
503   <target name="bld.test" depends="init"
504           description="Build and run tests">
505     <ant antfile="${calendar.build.file}" inheritrefs="true"
506          target="bld.test" />
507   </target>
508
509   <target name="run.test" depends="init"
510           description="Build and run tests">
511     <ant antfile="${calendar.build.file}" inheritrefs="true"
512          target="run.test" />
513   </target>
514
515   <target name="run.test.debug" depends="init"
516           description="Build and run tests">
517     <ant antfile="${calendar.build.file}" inheritrefs="true"
518          target="run.test"  >
519       <property name="org.bedework.debug" value="yes" />
520     </ant>
521   </target>
522
523   <!-- Rebuild the http test suite only -->
524   <target name="httptest" depends="init"
525           description="Run httptest suite" >
526     <input message="httptest may destroy this calendar db. Proceed with test"
527            validargs="y,n"
528            addproperty="do.httptest" />
529     <condition property="do.abort">
530       <equals arg1="n" arg2="${do.httptest}"/>
531     </condition>
532     <fail if="do.abort">httptest aborted by user.</fail>
533
534     <ant antfile="${calendar.build.file}" inheritrefs="true"
535            target="bld.httptest" />
536
537     <ant antfile="${calendar.build.file}" inheritrefs="true"
538            target="run.httptest" />
539   </target>
540
541   <!-- =================================================================
542        Run the synchml test application
543        ================================================================= -->
544
545   <target name="synchmltest" depends="init"
546           description="Run the synchml test application" >
547     <input message="synchmltest may destroy this calendar db. Proceed with test"
548            validargs="y,n"
549            addproperty="do.synchmltest" />
550     <condition property="do.abort">
551       <equals arg1="n" arg2="${do.synchmltest}"/>
552     </condition>
553     <fail if="do.abort">synchmltest aborted by user.</fail>
554
555     <ant antfile="${calendar.build.file}" inheritrefs="true"
556            target="synchmltest" />
557   </target>
558
559   <!-- ======================== schema target =======================
560        This builds the ddl from the hibernate schema
561        ================================================================= -->
562
563   <target name="schema" depends="init"
564           description="Generate schema from mapping files">
565     <ant antfile="${calendar.build.file}" inheritrefs="true"
566            target="schema" />
567   </target>
568
569   <!-- ======================== javadoc target =======================
570        ================================================================= -->
571
572   <target name="javadoc" depends="init"
573           description="Generate javadoc">
574     <ant antfile="${calendar.build.file}" inheritrefs="true"
575            target="javadoc" />
576   </target>
577
578   <!-- =================================================================
579        The "hsqldb" target starts the hsqldb server
580        ================================================================= -->
581
582   <target name="hsqldb" depends="init"
583           description="starts the hsqldb server">
584     <echo message="Starting hsqldb"/>
585     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
586       <classpath>
587         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
588       </classpath>
589       <arg value="-database"/>
590       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.dbname}"/>
591       <arg value="-port"/>
592       <arg value="8887"/>
593     </java>
594   </target>
595
596   <target name="hsqldb-trace" depends="init"
597           description="starts the hsqldb server">
598     <echo message="Starting hsqldb"/>
599     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
600       <classpath>
601         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
602       </classpath>
603       <arg value="-trace"/>
604       <arg value="true"/>
605       <arg value="-silent"/>
606       <arg value="false"/>
607       <arg value="-database"/>
608       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.dbname}"/>
609       <arg value="-port"/>
610       <arg value="8887"/>
611     </java>
612   </target>
613
614   <target name="uportaldb" depends="init"
615           description="starts the hsqldb server">
616     <echo message="Starting hsqldb"/>
617     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
618       <classpath>
619         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
620       </classpath>
621       <arg value="-database"/>
622       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.uportal2.dbname}"/>
623       <arg value="-port"/>
624       <arg value="9887"/>
625     </java>
626   </target>
627
628   <!-- =================================================================
629        The "hsqldb-test" target starts the hsqldb server for testing
630        ================================================================= -->
631
632   <target name="hsqldb-test" depends="init"
633           description="starts the hsqldb server for testing">
634     <echo message="Starting hsqldb for testing"/>
635     <delete dir="${org.bedework.hsqldb.dbdir}" />
636
637     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
638       <classpath>
639         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
640       </classpath>
641       <arg value="-database"/>
642       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.test.dbdir}/events"/>
643       <arg value="-port"/>
644       <arg value="8887"/>
645     </java>
646   </target>
647
648   <target name="hsqldb-test-trace" depends="init"
649           description="starts the hsqldb server for testing">
650     <echo message="Starting hsqldb for testing"/>
651     <delete dir="${org.bedework.hsqldb.dbdir}" />
652
653     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
654       <classpath>
655         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
656       </classpath>
657       <arg value="-trace"/>
658       <arg value="true"/>
659       <arg value="-silent"/>
660       <arg value="false"/>
661       <arg value="-database"/>
662       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.test.dbdir}/events"/>
663       <arg value="-port"/>
664       <arg value="8887"/>
665     </java>
666   </target>
667
668   <!-- =================================================================
669        The "hsqldb-mngr" target runs the DatabaseManager class which
670        provides a gui interface to the running hsqldb database.
671        ================================================================= -->
672
673   <target name="hsqldb-mngr" depends="init"
674           description="Runs the DatabaseManager class which provides a
675                        gui interface to the running hsqldb database">
676     <echo message="Starting hsqldb DatabaseManager"/>
677     <echo message="Select type: HSQL Database Engine Server"/>
678     <echo message="Set the URL to jdbc:hsqldb:hsql://localhost:8887"/>
679     <java fork="true" dir="${basedir}"
680           classname="org.hsqldb.util.DatabaseManager">
681       <classpath>
682         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
683       </classpath>
684     </java>
685   </target>
686
687   <!-- =================================================================
688        The "tomcatstart" target starts Tomcat
689        ================================================================= -->
690
691   <target name="tomcatstart-locale" depends="init"
692           description="starts the tomcat server">
693     <input message="Enter language code: "
694            addproperty="tomcat.locale" />
695
696     <input message="Enter country code: "
697            addproperty="tomcat.country" />
698
699     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
700     <java fork="true" dir="${basedir}"
701           classname="org.apache.catalina.startup.Bootstrap">
702       <classpath>
703         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
704       </classpath>
705       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
706       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
707       <jvmarg value="-Duser.language=${tomcat.locale}"/>
708       <jvmarg value="-Duser.country=${tomcat.country}"/>
709       <!--
710       <jvmarg value="-Dfile.encoding=ISO-8859-1"/>
711       -->
712       <arg value="start"/>
713     </java>
714   </target>
715
716   <target name="tomcatstart" depends="init"
717           description="starts the tomcat server">
718     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
719     <java fork="true" dir="${basedir}"
720           classname="org.apache.catalina.startup.Bootstrap">
721       <classpath>
722         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
723       </classpath>
724       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
725       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
726       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
727       <arg value="start"/>
728     </java>
729   </target>
730
731   <target name="tomcatstart-profile" depends="init"
732           description="starts the tomcat server with rpofiling">
733     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
734     <java fork="true" dir="${basedir}"
735           classname="org.apache.catalina.startup.Bootstrap">
736       <classpath>
737         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
738       </classpath>
739       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
740       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
741       <jvmarg value="-Xrunyjpagent:cpu=times,onexit=cpu" />
742       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
743       <arg value="start"/>
744     </java>
745   </target>
746
747   <target name="tomcatstart-profile-large" depends="init"
748           description="starts the tomcat server with rpofiling">
749     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
750     <java fork="true" dir="${basedir}"
751           classname="org.apache.catalina.startup.Bootstrap">
752       <classpath>
753         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
754       </classpath>
755       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
756       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
757       <jvmarg value="-Xms128m" />
758       <jvmarg value="-Xmx630m" />
759       <!--
760       <jvmarg value="-XX:PermSize=128m" />
761       <jvmarg value="-XX:MaxPermSize=128m" />
762       -->
763       <jvmarg value="-server" />
764       <jvmarg value="-Xrunyjpagent:cpu=times,onexit=cpu" />
765       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
766       <arg value="start"/>
767     </java>
768   </target>
769
770   <target name="tomcatstart-debug" depends="init"
771           description="starts the tomcat server with remote debugging enabled">
772     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
773     <java fork="true" dir="${basedir}"
774           classname="org.apache.catalina.startup.Bootstrap">
775       <classpath>
776         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
777       </classpath>
778       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
779       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
780       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
781       <jvmarg value="-Xdebug"/>
782       <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"/>
783       <arg value="start"/>
784     </java>
785   </target>
786
787   <!-- This target is for use when sync4j is installed -->
788   <target name="tomcatstart-sync4j" depends="init"
789           description="starts the tomcat server with sync4j">
790     <echo message="Starting Tomcat 5.0.16 with sync4j"/>
791     <java fork="true" dir="${basedir}"
792           classname="org.apache.catalina.startup.Bootstrap">
793       <classpath>
794         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
795       </classpath>
796       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
797       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
798       <jvmarg value="-Dsync4j.home=${sync4j.dir}"/>
799       <arg value="start"/>
800     </java>
801   </target>
802
803   <!-- =================================================================
804        The "tomcatstop" target stops Tomcat cleanly
805        ================================================================= -->
806
807   <target name="tomcatstop" depends="init">
808     <echo message="Stopping Tomcat 5.0.16"/>
809     <java fork="true" dir="${basedir}"
810           classname="org.apache.catalina.startup.Bootstrap">
811       <classpath>
812         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
813       </classpath>
814       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
815       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
816       <arg value="stop"/>
817     </java>
818   </target>
819 </project>
Note: See TracBrowser for help on using the browser.