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

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

Further config changes

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     <!-- Unfortunately it sits on top of everything
87     <splash imageurl="file://${org.bedework.project.bedework}/docs/icons/bedeworkLogo.gif"/>
88     -->
89   </target>
90
91   <target name="run.init" depends="init" >
92     <property name="org.bedework.user.build.properties"
93               location="${user.home}/bedework.build.properties" />
94
95     <echo message="Load user properties from ${org.bedework.user.build.properties}" />
96
97     <!-- Load user property definition overrides -->
98     <property file="${org.bedework.user.build.properties}" />
99
100     <!-- ==================== config properties ========================= -->
101     <property name="org.bedework.config.properties"
102               location="${org.bedework.config.base}/configs/democal.properties" />
103     <property name="org.bedework.config.options"
104               location="${org.bedework.config.base}/configs/democal.options.xml" />
105
106     <echo message="==========================================================" />
107     <echo message="Use config properties ${org.bedework.config.properties}" />
108     <loadproperties
109           srcFile="${org.bedework.config.properties}" >
110       <filterchain>
111         <expandproperties/>
112       </filterchain>
113     </loadproperties>
114   </target>
115
116   <!-- =================================================================
117        The "build" target builds the jar files
118        ================================================================= -->
119
120   <target name="build" depends="init"
121           description="builds the jars">
122     <ant antfile="${bedework.build.file}" inheritrefs="true"
123            target="build" />
124   </target>
125
126   <target name="clean.build" depends="clean"
127           description="cleans then builds the jars">
128     <ant antfile="${bedework.build.file}" inheritrefs="true"
129            target="clean.build" />
130   </target>
131
132   <!-- =================================================================
133        The "deploy" target builds and deploys the applications
134        ================================================================= -->
135
136   <target name="deploy" depends="init"
137           description="builds and deploys the applications">
138     <ant antfile="${bedework.build.file}" inheritrefs="true"
139            target="deploy" />
140   </target>
141
142   <target name="deploy.debug" depends="init"
143           description="builds and deploys the applications">
144     <ant antfile="${bedework.build.file}" inheritrefs="true"
145            target="deploy.debug" />
146   </target>
147
148   <!-- =================================================================
149        The "clean.deploy" target cleans, builds and deploys the applications
150        ================================================================= -->
151
152   <target name="clean" depends="init"
153           description="Remove all generated files.">
154     <ant antfile="${bedework.build.file}" inheritrefs="true"
155            target="clean" />
156   </target>
157
158   <target name="quickstart-clean" depends="init"
159           description="partial clean up for quickstart.">
160     <ant antfile="${bedework.build.file}" inheritrefs="true"
161            target="quickstart-clean" />
162   </target>
163
164   <target name="clean.deploy" depends="init"
165           description="builds and deploys the applications">
166     <ant antfile="${bedework.build.file}" inheritrefs="true"
167            target="clean.deploy" />
168   </target>
169
170   <target name="clean.deploy.debug" depends="init"
171           description="builds and deploys the applications">
172     <ant antfile="${bedework.build.file}" inheritrefs="true"
173            target="clean.deploy.debug" />
174   </target>
175
176   <!-- =================================================================
177        The "build.configured" target builds configured applications
178        ================================================================= -->
179
180   <target name="build.configured" depends="init"
181           description="Build configured applications" >
182     <ant antfile="${bedework.build.file}" inheritrefs="true"
183            target="build.configured" />
184   </target>
185
186   <target name="build.configured.debug" depends="init"
187           description="Build configured applications" >
188     <ant antfile="${bedework.build.file}" inheritrefs="true"
189            target="build.configured.debug" />
190   </target>
191
192   <target name="clean.build.configured" depends="init"
193           description="Build configured applications" >
194     <ant antfile="${bedework.build.file}" inheritrefs="true"
195            target="clean.build.configured" />
196   </target>
197
198   <target name="clean.build.configured.debug" depends="init"
199           description="Build configured applications" >
200     <ant antfile="${bedework.build.file}" inheritrefs="true"
201            target="clean.build.configured.debug" />
202   </target>
203
204   <!-- =================================================================
205        The "javadoc" target builds javadocs for all projects
206        ================================================================= -->
207
208   <target name="javadoc" depends="init"
209           description="Build javadocs" >
210     <ant antfile="${bedework.build.file}" inheritrefs="true"
211          target="javadoc" />
212   </target>
213
214   <!-- =================================================================
215        The "hsqldb" target starts the hsqldb server
216        ================================================================= -->
217
218   <target name="hsqldb" depends="run.init"
219           description="starts the hsqldb server">
220     <echo message="Starting hsqldb"/>
221     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
222       <classpath>
223         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
224       </classpath>
225       <arg value="-database"/>
226       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.dbname}"/>
227       <arg value="-port"/>
228       <arg value="8887"/>
229     </java>
230   </target>
231
232   <target name="hsqldb-trace" depends="run.init"
233           description="starts the hsqldb server">
234     <echo message="Starting hsqldb"/>
235     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
236       <classpath>
237         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
238       </classpath>
239       <arg value="-trace"/>
240       <arg value="true"/>
241       <arg value="-silent"/>
242       <arg value="false"/>
243       <arg value="-database"/>
244       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.dbname}"/>
245       <arg value="-port"/>
246       <arg value="8887"/>
247     </java>
248   </target>
249
250   <target name="hsqldb-trace-9887" depends="run.init"
251           description="starts the hsqldb server">
252     <echo message="Starting hsqldb"/>
253     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
254       <classpath>
255         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
256       </classpath>
257       <arg value="-trace"/>
258       <arg value="true"/>
259       <arg value="-silent"/>
260       <arg value="false"/>
261       <arg value="-database"/>
262       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.dbname}"/>
263       <arg value="-port"/>
264       <arg value="9887"/>
265     </java>
266   </target>
267
268   <target name="uportaldb" depends="run.init"
269           description="starts the hsqldb server">
270     <echo message="Starting hsqldb"/>
271     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
272       <classpath>
273         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
274       </classpath>
275       <arg value="-database"/>
276       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.uportal2.dbname}"/>
277       <arg value="-port"/>
278       <arg value="9887"/>
279     </java>
280   </target>
281
282   <!-- =================================================================
283        The "hsqldb-test" target starts the hsqldb server for testing
284        ================================================================= -->
285
286   <target name="hsqldb-test" depends="run.init"
287           description="starts the hsqldb server for testing">
288     <echo message="Starting hsqldb for testing"/>
289     <delete dir="${org.bedework.hsqldb.dbdir}" />
290
291     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
292       <classpath>
293         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
294       </classpath>
295       <arg value="-database"/>
296       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.test.dbdir}/events"/>
297       <arg value="-port"/>
298       <arg value="8887"/>
299     </java>
300   </target>
301
302   <target name="hsqldb-test-trace" depends="run.init"
303           description="starts the hsqldb server for testing">
304     <echo message="Starting hsqldb for testing"/>
305     <delete dir="${org.bedework.hsqldb.dbdir}" />
306
307     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
308       <classpath>
309         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
310       </classpath>
311       <arg value="-trace"/>
312       <arg value="true"/>
313       <arg value="-silent"/>
314       <arg value="false"/>
315       <arg value="-database"/>
316       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.test.dbdir}/events"/>
317       <arg value="-port"/>
318       <arg value="8887"/>
319     </java>
320   </target>
321
322   <!-- =================================================================
323        The "hsqldb-mngr" target runs the DatabaseManager class which
324        provides a gui interface to the running hsqldb database.
325        ================================================================= -->
326
327   <target name="hsqldb-mngr" depends="run.init"
328           description="Runs the DatabaseManager class which provides a
329                        gui interface to the running hsqldb database">
330     <echo message="Starting hsqldb DatabaseManager"/>
331     <echo message="Select type: HSQL Database Engine Server"/>
332     <echo message="Set the URL to jdbc:hsqldb:hsql://localhost:8887"/>
333     <java fork="true" dir="${basedir}"
334           classname="org.hsqldb.util.DatabaseManager">
335       <classpath>
336         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
337       </classpath>
338     </java>
339   </target>
340
341   <!-- =================================================================
342        The "tomcatstart" target starts Tomcat
343        ================================================================= -->
344
345   <target name="tomcatstart-locale" depends="run.init"
346           description="starts the tomcat server">
347     <input message="Enter language code: "
348            addproperty="tomcat.locale" />
349
350     <input message="Enter country code: "
351            addproperty="tomcat.country" />
352
353     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
354     <java fork="true" dir="${basedir}"
355           classname="org.apache.catalina.startup.Bootstrap">
356       <classpath>
357         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
358       </classpath>
359       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
360       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
361       <jvmarg value="-Duser.language=${tomcat.locale}"/>
362       <jvmarg value="-Duser.country=${tomcat.country}"/>
363       <!--
364       <jvmarg value="-Dfile.encoding=ISO-8859-1"/>
365       -->
366       <arg value="start"/>
367     </java>
368   </target>
369
370   <target name="tomcatstart" depends="run.init"
371           description="starts the tomcat server">
372     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
373     <java fork="true" dir="${basedir}"
374           classname="org.apache.catalina.startup.Bootstrap">
375       <classpath>
376         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
377       </classpath>
378       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
379       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
380       <jvmarg value="-Xms128m" />
381       <jvmarg value="-Xmx630m" />
382       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
383       <jvmarg value="-Dfile.encoding=UTF-8"/>
384       <arg value="start"/>
385     </java>
386   </target>
387
388   <target name="tomcatstart-large" depends="run.init"
389           description="starts a large memory version of the tomcat server">
390     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
391     <java fork="true" dir="${basedir}"
392           classname="org.apache.catalina.startup.Bootstrap">
393       <classpath>
394         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
395       </classpath>
396       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
397       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
398       <jvmarg value="-Xms128m" />
399       <jvmarg value="-Xmx630m" />
400       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
401       <arg value="start"/>
402     </java>
403   </target>
404
405   <target name="tomcatstart-profile" depends="run.init"
406           description="starts the tomcat server with rpofiling">
407     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
408     <java fork="true" dir="${basedir}"
409           classname="org.apache.catalina.startup.Bootstrap">
410       <classpath>
411         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
412       </classpath>
413       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
414       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
415       <jvmarg value="-Xrunyjpagent:cpu=times,onexit=cpu" />
416       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
417       <arg value="start"/>
418     </java>
419   </target>
420
421   <target name="tomcatstart-profile-large" depends="run.init"
422           description="starts the tomcat server with rpofiling">
423     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
424     <java fork="true" dir="${basedir}"
425           classname="org.apache.catalina.startup.Bootstrap">
426       <classpath>
427         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
428       </classpath>
429       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
430       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
431       <jvmarg value="-Xms128m" />
432       <jvmarg value="-Xmx630m" />
433       <!--
434       <jvmarg value="-XX:PermSize=128m" />
435       <jvmarg value="-XX:MaxPermSize=128m" />
436       -->
437       <jvmarg value="-server" />
438       <jvmarg value="-agentlib:hprof=cpu=samples,depth=15" />
439       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
440       <arg value="start"/>
441     </java>
442   </target>
443
444   <target name="tomcatstart-debug" depends="run.init"
445           description="starts the tomcat server with remote debugging enabled">
446     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
447     <java fork="true" dir="${basedir}"
448           classname="org.apache.catalina.startup.Bootstrap">
449       <classpath>
450         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
451       </classpath>
452       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
453       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
454       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
455       <jvmarg value="-Xdebug"/>
456       <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"/>
457       <arg value="start"/>
458     </java>
459   </target>
460
461   <!-- This target is for use when sync4j is installed -->
462   <target name="tomcatstart-sync4j" depends="run.init"
463           description="starts the tomcat server with sync4j">
464     <echo message="Starting Tomcat with sync4j"/>
465     <java fork="true" dir="${basedir}"
466           classname="org.apache.catalina.startup.Bootstrap">
467       <classpath>
468         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
469       </classpath>
470       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
471       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
472       <jvmarg value="-Dsync4j.home=${sync4j.dir}"/>
473       <arg value="start"/>
474     </java>
475   </target>
476
477   <!-- =================================================================
478        The "tomcatstop" target stops Tomcat cleanly
479        ================================================================= -->
480
481   <target name="tomcatstop" depends="run.init">
482     <echo message="Stopping Tomcat"/>
483     <java fork="true" dir="${basedir}"
484           classname="org.apache.catalina.startup.Bootstrap">
485       <classpath>
486         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
487       </classpath>
488       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
489       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
490       <arg value="stop"/>
491     </java>
492   </target>
493 </project>
Note: See TracBrowser for help on using the browser.