root/releases/bedework-3.4.1.1/build/quickstart-build.xml

Revision 1808 (checked in by douglm, 5 years ago)

Merge in revision 1806 from release 3.4.1

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   <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
15
16   <target name="README" depends="init"
17           description="Describe targets and their usage">
18     <loadfile property="org.bedework.README" srcFile="${org.bedework.calendar.dir}/docs/README"/>
19     <echo message="${org.bedework.README}" />
20   </target>
21
22   <target name="usage" depends="init"
23           description="Describe targets and their usage">
24     <echo message="As distributed the package should be ready to go."/>
25     <echo message="Ensure ant is on your path, (a version is in the" />
26     <echo message="package)"/>
27     <echo message=""/>
28     <echo message="First in one window do"/>
29     <echo message="    ant hsqldb"/>
30     <echo message="This will start the hsqldb server ready for the "/>
31     <echo message="application."/>
32     <echo message=""/>
33     <echo message="In another window do"/>
34     <echo message="    ant tomcatstart"/>
35     <echo message=""/>
36     <echo message="Once tomcat is running you should be able to go to a"/>
37     <echo message="browser and connect to"/>
38     <echo message="    http://localhost:8080/bedework"/>
39     <echo message="and follow the instructions."/>
40     <echo message=""/>
41     <echo message="To build the calendar do"/>
42     <echo message="    ant deploy    or "/>
43     <echo message="    ant deploy.debug "/>
44     <echo message="which does a build and deploy of all components"/>
45     <echo message=""/>
46     <echo message="To rebuild the calendar do"/>
47     <echo message="    ant clean.deploy    or "/>
48     <echo message="    ant clean.deploy.debug "/>
49     <echo message="which does a clean, build and deploy of all components"/>
50     <echo message=""/>
51     <echo message="See documentation in the docs directory or on bedework.org"/>
52     <echo message="for instructions on creating a locally configured calendar application"/>
53     <echo message=""/>
54   </target>
55
56    <!-- The only properties set below should be those directly used to
57         invoke the targets below, in this file.
58         Do not set properties here for tasks invoked in other build
59         files.  Instead, make sure the targets work in calendar/build.xml,
60         then invoke ant on the task in calendar/build.xml.
61
62         For an example, of invoking ant on another build file,
63         see the deploy target, below.
64      -->
65   <target name="init" >
66     <dirname property="quickstart.dir" file="${ant.file}"/>
67
68     <property name="org.bedework.project.bedework"
69               location="${basedir}/bedework" />
70
71     <property name="org.bedework.config.base"
72               location="${org.bedework.project.bedework}/config" />
73
74     <property name="bedework.build.file"
75               location="${basedir}/bedework/build.xml" />
76     <property name="org.bedework.user.build.properties"
77               location="${user.home}/bedework.build.properties" />
78     <dirname property="org.bedework.configuration.location"
79              file="${org.bedework.user.build.properties}" />
80
81     <echo message="Load user properties from ${org.bedework.user.build.properties}" />
82
83     <!-- Load user property definition overrides -->
84     <property file="${org.bedework.user.build.properties}" />
85
86     <!-- This may have defined the config properties location. Load that now to get overrides -->
87     <property file="${org.bedework.config.properties}" />
88
89
90     <!-- Unfortunately it sits on top of everything
91     <splash imageurl="file://${org.bedework.project.bedework}/docs/icons/bedeworkLogo.gif"/>
92     -->
93   </target>
94
95   <target name="run.init" depends="init" >
96     <property name="org.bedework.user.build.properties"
97               location="${user.home}/bedework.build.properties" />
98
99     <echo message="Load user properties from ${org.bedework.user.build.properties}" />
100
101     <!-- Load user property definition overrides -->
102     <property file="${org.bedework.user.build.properties}" />
103
104     <!-- ==================== config properties ========================= -->
105     <property name="org.bedework.config.properties"
106               location="${org.bedework.config.base}/configs/democal.properties" />
107     <property name="org.bedework.config.options"
108               location="${org.bedework.config.base}/configs/democal.options.xml" />
109
110     <echo message="==========================================================" />
111     <echo message="Use config properties ${org.bedework.config.properties}" />
112     <loadproperties
113           srcFile="${org.bedework.config.properties}" >
114       <filterchain>
115         <expandproperties/>
116       </filterchain>
117     </loadproperties>
118   </target>
119
120   <!-- =================================================================
121        The "build" target builds the jar files
122        ================================================================= -->
123
124   <target name="build" depends="init"
125           description="builds the jars">
126     <ant antfile="${bedework.build.file}" inheritrefs="true"
127            target="build" />
128   </target>
129
130   <target name="clean.build" depends="clean"
131           description="cleans then builds the jars">
132     <ant antfile="${bedework.build.file}" inheritrefs="true"
133            target="clean.build" />
134   </target>
135
136   <!-- =================================================================
137        The "deploy" target builds and deploys the applications
138        ================================================================= -->
139
140   <target name="deploy" depends="init"
141           description="builds and deploys the applications">
142     <ant antfile="${bedework.build.file}" inheritrefs="true"
143            target="deploy" />
144   </target>
145
146   <target name="deploy.debug" depends="init"
147           description="builds and deploys the applications">
148     <ant antfile="${bedework.build.file}" inheritrefs="true"
149            target="deploy.debug" />
150   </target>
151
152   <!-- =================================================================
153        The "clean.deploy" target cleans, builds and deploys the applications
154        ================================================================= -->
155
156   <target name="clean" depends="init"
157           description="Remove all generated files.">
158     <ant antfile="${bedework.build.file}" inheritrefs="true"
159            target="clean" />
160   </target>
161
162   <target name="quickstart-clean" depends="init"
163           description="partial clean up for quickstart.">
164     <ant antfile="${bedework.build.file}" inheritrefs="true"
165            target="quickstart-clean" />
166   </target>
167
168   <target name="clean.deploy" depends="init"
169           description="builds and deploys the applications">
170     <ant antfile="${bedework.build.file}" inheritrefs="true"
171            target="clean.deploy" />
172   </target>
173
174   <target name="clean.deploy.debug" depends="init"
175           description="builds and deploys the applications">
176     <ant antfile="${bedework.build.file}" inheritrefs="true"
177            target="clean.deploy.debug" />
178   </target>
179
180   <!-- =================================================================
181        The "build.configured" target builds configured applications
182        ================================================================= -->
183
184   <target name="build.configured" depends="init"
185           description="Build configured applications" >
186     <ant antfile="${bedework.build.file}" inheritrefs="true"
187            target="build.configured" />
188   </target>
189
190   <target name="build.configured.debug" depends="init"
191           description="Build configured applications" >
192     <ant antfile="${bedework.build.file}" inheritrefs="true"
193            target="build.configured.debug" />
194   </target>
195
196   <target name="clean.build.configured" depends="init"
197           description="Build configured applications" >
198     <ant antfile="${bedework.build.file}" inheritrefs="true"
199            target="clean.build.configured" />
200   </target>
201
202   <target name="clean.build.configured.debug" depends="init"
203           description="Build configured applications" >
204     <ant antfile="${bedework.build.file}" inheritrefs="true"
205            target="clean.build.configured.debug" />
206   </target>
207
208   <!-- =================================================================
209        The "javadoc" target builds javadocs for all projects
210        ================================================================= -->
211
212   <target name="javadoc" depends="init"
213           description="Build javadocs" >
214     <ant antfile="${bedework.build.file}" inheritrefs="true"
215          target="javadoc" />
216   </target>
217
218   <!-- =================================================================
219        The "hsqldb" target starts the hsqldb server
220        ================================================================= -->
221
222   <target name="hsqldb" depends="run.init"
223           description="starts the hsqldb server">
224     <echo message="Starting hsqldb"/>
225     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
226       <classpath>
227         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
228       </classpath>
229       <arg value="-database"/>
230       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.dbname}"/>
231       <arg value="-port"/>
232       <arg value="8887"/>
233     </java>
234   </target>
235
236   <target name="hsqldb-trace" depends="run.init"
237           description="starts the hsqldb server">
238     <echo message="Starting hsqldb"/>
239     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
240       <classpath>
241         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
242       </classpath>
243       <arg value="-trace"/>
244       <arg value="true"/>
245       <arg value="-silent"/>
246       <arg value="false"/>
247       <arg value="-database"/>
248       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.dbname}"/>
249       <arg value="-port"/>
250       <arg value="8887"/>
251     </java>
252   </target>
253
254   <target name="hsqldb-trace-9887" depends="run.init"
255           description="starts the hsqldb server">
256     <echo message="Starting hsqldb"/>
257     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
258       <classpath>
259         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
260       </classpath>
261       <arg value="-trace"/>
262       <arg value="true"/>
263       <arg value="-silent"/>
264       <arg value="false"/>
265       <arg value="-database"/>
266       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.dbname}"/>
267       <arg value="-port"/>
268       <arg value="9887"/>
269     </java>
270   </target>
271
272   <target name="uportaldb" depends="run.init"
273           description="starts the hsqldb server">
274     <echo message="Starting hsqldb"/>
275     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
276       <classpath>
277         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
278       </classpath>
279       <arg value="-database"/>
280       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.uportal2.dbname}"/>
281       <arg value="-port"/>
282       <arg value="9887"/>
283     </java>
284   </target>
285
286   <!-- =================================================================
287        The "hsqldb-test" target starts the hsqldb server for testing
288        ================================================================= -->
289
290   <target name="hsqldb-test" depends="run.init"
291           description="starts the hsqldb server for testing">
292     <echo message="Starting hsqldb for testing"/>
293     <delete dir="${org.bedework.hsqldb.dbdir}" />
294
295     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
296       <classpath>
297         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
298       </classpath>
299       <arg value="-database"/>
300       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.test.dbdir}/events"/>
301       <arg value="-port"/>
302       <arg value="8887"/>
303     </java>
304   </target>
305
306   <target name="hsqldb-test-trace" depends="run.init"
307           description="starts the hsqldb server for testing">
308     <echo message="Starting hsqldb for testing"/>
309     <delete dir="${org.bedework.hsqldb.dbdir}" />
310
311     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
312       <classpath>
313         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
314       </classpath>
315       <arg value="-trace"/>
316       <arg value="true"/>
317       <arg value="-silent"/>
318       <arg value="false"/>
319       <arg value="-database"/>
320       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.test.dbdir}/events"/>
321       <arg value="-port"/>
322       <arg value="8887"/>
323     </java>
324   </target>
325
326   <!-- =================================================================
327        The "hsqldb-mngr" target runs the DatabaseManager class which
328        provides a gui interface to the running hsqldb database.
329        ================================================================= -->
330
331   <target name="hsqldb-mngr" depends="run.init"
332           description="Runs the DatabaseManager class which provides a
333                        gui interface to the running hsqldb database">
334     <echo message="Starting hsqldb DatabaseManager"/>
335     <echo message="Select type: HSQL Database Engine Server"/>
336     <echo message="Set the URL to jdbc:hsqldb:hsql://localhost:8887"/>
337     <java fork="true" dir="${basedir}"
338           classname="org.hsqldb.util.DatabaseManager">
339       <classpath>
340         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
341       </classpath>
342     </java>
343   </target>
344
345   <!-- =================================================================
346        The "tomcatstart" target starts Tomcat
347        ================================================================= -->
348
349   <target name="tomcatstart-locale" depends="run.init"
350           description="starts the tomcat server">
351     <input message="Enter language code: "
352            addproperty="tomcat.locale" />
353
354     <input message="Enter country code: "
355            addproperty="tomcat.country" />
356
357     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
358     <java fork="true" dir="${basedir}"
359           classname="org.apache.catalina.startup.Bootstrap">
360       <classpath>
361         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
362       </classpath>
363       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
364       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
365       <jvmarg value="-Duser.language=${tomcat.locale}"/>
366       <jvmarg value="-Duser.country=${tomcat.country}"/>
367       <!--
368       <jvmarg value="-Dfile.encoding=ISO-8859-1"/>
369       -->
370       <arg value="start"/>
371     </java>
372   </target>
373
374   <target name="tomcatstart" depends="run.init"
375           description="starts the tomcat server">
376     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
377     <java fork="true" dir="${basedir}"
378           classname="org.apache.catalina.startup.Bootstrap">
379       <classpath>
380         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
381       </classpath>
382       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
383       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
384       <jvmarg value="-Xms128m" />
385       <jvmarg value="-Xmx630m" />
386       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
387       <jvmarg value="-Dfile.encoding=UTF-8"/>
388       <arg value="start"/>
389     </java>
390   </target>
391
392   <target name="tomcatstart-large" depends="run.init"
393           description="starts a large memory version of the tomcat server">
394     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
395     <java fork="true" dir="${basedir}"
396           classname="org.apache.catalina.startup.Bootstrap">
397       <classpath>
398         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
399       </classpath>
400       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
401       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
402       <jvmarg value="-Xms128m" />
403       <jvmarg value="-Xmx630m" />
404       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
405       <arg value="start"/>
406     </java>
407   </target>
408
409   <target name="tomcatstart-profile" depends="run.init"
410           description="starts the tomcat server with rpofiling">
411     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
412     <java fork="true" dir="${basedir}"
413           classname="org.apache.catalina.startup.Bootstrap">
414       <classpath>
415         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
416       </classpath>
417       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
418       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
419       <jvmarg value="-Xrunyjpagent:cpu=times,onexit=cpu" />
420       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
421       <arg value="start"/>
422     </java>
423   </target>
424
425   <target name="tomcatstart-profile-large" depends="run.init"
426           description="starts the tomcat server with rpofiling">
427     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
428     <java fork="true" dir="${basedir}"
429           classname="org.apache.catalina.startup.Bootstrap">
430       <classpath>
431         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
432       </classpath>
433       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
434       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
435       <jvmarg value="-Xms128m" />
436       <jvmarg value="-Xmx630m" />
437       <!--
438       <jvmarg value="-XX:PermSize=128m" />
439       <jvmarg value="-XX:MaxPermSize=128m" />
440       -->
441       <jvmarg value="-server" />
442       <jvmarg value="-agentlib:hprof=cpu=samples,depth=15" />
443       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
444       <arg value="start"/>
445     </java>
446   </target>
447
448   <target name="tomcatstart-profile-yk" depends="run.init"
449           description="starts the tomcat server with rpofiling">
450     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
451     <java fork="true" dir="${basedir}"
452           classname="org.apache.catalina.startup.Bootstrap">
453       <classpath>
454         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
455       </classpath>
456       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
457       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
458       <jvmarg value="-Xms128m" />
459       <jvmarg value="-Xmx1028m" />
460       <jvmarg value="-XX:PermSize=128m" />
461       <jvmarg value="-XX:MaxPermSize=128m" />
462       <jvmarg value="-server" />
463       <jvmarg value="-agentlib:yjpagent" />
464       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
465       <arg value="start"/>
466     </java>
467   </target>
468
469   <target name="tomcatstart-debug" depends="run.init"
470           description="starts the tomcat server with remote debugging enabled">
471     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
472     <java fork="true" dir="${basedir}"
473           classname="org.apache.catalina.startup.Bootstrap">
474       <classpath>
475         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
476       </classpath>
477       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
478       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
479       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
480       <jvmarg value="-Xdebug"/>
481       <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"/>
482       <arg value="start"/>
483     </java>
484   </target>
485
486   <!-- This target is for use when sync4j is installed -->
487   <target name="tomcatstart-sync4j" depends="run.init"
488           description="starts the tomcat server with sync4j">
489     <echo message="Starting Tomcat with sync4j"/>
490     <java fork="true" dir="${basedir}"
491           classname="org.apache.catalina.startup.Bootstrap">
492       <classpath>
493         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
494       </classpath>
495       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
496       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
497       <jvmarg value="-Dsync4j.home=${sync4j.dir}"/>
498       <arg value="start"/>
499     </java>
500   </target>
501
502   <!-- =================================================================
503        The "tomcatstop" target stops Tomcat cleanly
504        ================================================================= -->
505
506   <target name="tomcatstop" depends="run.init">
507     <echo message="Stopping Tomcat"/>
508     <java fork="true" dir="${basedir}"
509           classname="org.apache.catalina.startup.Bootstrap">
510       <classpath>
511         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
512       </classpath>
513       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
514       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
515       <arg value="stop"/>
516     </java>
517   </target>
518 </project>
Note: See TracBrowser for help on using the browser.