root/trunk/build/quickstart-build.xml

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

Fix dirty collection exception when updating attendees

Fix errors caused by removal of deploy.properties

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