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

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

Add quickstart-clean target
Add scheduling fields to dump/restore

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