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

Revision 1230 (checked in by douglm, 6 years ago)

Allow hsql startup on port 9887

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