root/trunk/build/quickstart-build.xml

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

Fix problems with timezones by updating ical4j

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="uportaldb" 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="-database"/>
241       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.uportal2.dbname}"/>
242       <arg value="-port"/>
243       <arg value="9887"/>
244     </java>
245   </target>
246
247   <!-- =================================================================
248        The "hsqldb-test" target starts the hsqldb server for testing
249        ================================================================= -->
250
251   <target name="hsqldb-test" depends="run.init"
252           description="starts the hsqldb server for testing">
253     <echo message="Starting hsqldb for testing"/>
254     <delete dir="${org.bedework.hsqldb.dbdir}" />
255
256     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
257       <classpath>
258         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
259       </classpath>
260       <arg value="-database"/>
261       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.test.dbdir}/events"/>
262       <arg value="-port"/>
263       <arg value="8887"/>
264     </java>
265   </target>
266
267   <target name="hsqldb-test-trace" depends="run.init"
268           description="starts the hsqldb server for testing">
269     <echo message="Starting hsqldb for testing"/>
270     <delete dir="${org.bedework.hsqldb.dbdir}" />
271
272     <java fork="true" dir="${basedir}" classname="org.hsqldb.Server">
273       <classpath>
274         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
275       </classpath>
276       <arg value="-trace"/>
277       <arg value="true"/>
278       <arg value="-silent"/>
279       <arg value="false"/>
280       <arg value="-database"/>
281       <arg value="${org.bedework.hsqldb.dir}/${org.bedework.hsqldb.test.dbdir}/events"/>
282       <arg value="-port"/>
283       <arg value="8887"/>
284     </java>
285   </target>
286
287   <!-- =================================================================
288        The "hsqldb-mngr" target runs the DatabaseManager class which
289        provides a gui interface to the running hsqldb database.
290        ================================================================= -->
291
292   <target name="hsqldb-mngr" depends="run.init"
293           description="Runs the DatabaseManager class which provides a
294                        gui interface to the running hsqldb database">
295     <echo message="Starting hsqldb DatabaseManager"/>
296     <echo message="Select type: HSQL Database Engine Server"/>
297     <echo message="Set the URL to jdbc:hsqldb:hsql://localhost:8887"/>
298     <java fork="true" dir="${basedir}"
299           classname="org.hsqldb.util.DatabaseManager">
300       <classpath>
301         <pathelement path="${org.bedework.hsqldb.dir}/lib/hsqldb.jar"/>
302       </classpath>
303     </java>
304   </target>
305
306   <!-- =================================================================
307        The "tomcatstart" target starts Tomcat
308        ================================================================= -->
309
310   <target name="tomcatstart-locale" depends="run.init"
311           description="starts the tomcat server">
312     <input message="Enter language code: "
313            addproperty="tomcat.locale" />
314
315     <input message="Enter country code: "
316            addproperty="tomcat.country" />
317
318     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
319     <java fork="true" dir="${basedir}"
320           classname="org.apache.catalina.startup.Bootstrap">
321       <classpath>
322         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
323       </classpath>
324       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
325       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
326       <jvmarg value="-Duser.language=${tomcat.locale}"/>
327       <jvmarg value="-Duser.country=${tomcat.country}"/>
328       <!--
329       <jvmarg value="-Dfile.encoding=ISO-8859-1"/>
330       -->
331       <arg value="start"/>
332     </java>
333   </target>
334
335   <target name="tomcatstart" depends="run.init"
336           description="starts the tomcat server">
337     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
338     <java fork="true" dir="${basedir}"
339           classname="org.apache.catalina.startup.Bootstrap">
340       <classpath>
341         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
342       </classpath>
343       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
344       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
345       <jvmarg value="-Xms128m" />
346       <jvmarg value="-Xmx630m" />
347       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
348       <arg value="start"/>
349     </java>
350   </target>
351
352   <target name="tomcatstart-large" depends="run.init"
353           description="starts a large memory version of the tomcat server">
354     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
355     <java fork="true" dir="${basedir}"
356           classname="org.apache.catalina.startup.Bootstrap">
357       <classpath>
358         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
359       </classpath>
360       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
361       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
362       <jvmarg value="-Xms128m" />
363       <jvmarg value="-Xmx630m" />
364       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
365       <arg value="start"/>
366     </java>
367   </target>
368
369   <target name="tomcatstart-profile" depends="run.init"
370           description="starts the tomcat server with rpofiling">
371     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
372     <java fork="true" dir="${basedir}"
373           classname="org.apache.catalina.startup.Bootstrap">
374       <classpath>
375         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
376       </classpath>
377       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
378       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
379       <jvmarg value="-Xrunyjpagent:cpu=times,onexit=cpu" />
380       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
381       <arg value="start"/>
382     </java>
383   </target>
384
385   <target name="tomcatstart-profile-large" depends="run.init"
386           description="starts the tomcat server with rpofiling">
387     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
388     <java fork="true" dir="${basedir}"
389           classname="org.apache.catalina.startup.Bootstrap">
390       <classpath>
391         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
392       </classpath>
393       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
394       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
395       <jvmarg value="-Xms128m" />
396       <jvmarg value="-Xmx630m" />
397       <!--
398       <jvmarg value="-XX:PermSize=128m" />
399       <jvmarg value="-XX:MaxPermSize=128m" />
400       -->
401       <jvmarg value="-server" />
402       <jvmarg value="-Xrunyjpagent:cpu=times,onexit=cpu" />
403       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
404       <arg value="start"/>
405     </java>
406   </target>
407
408   <target name="tomcatstart-debug" depends="run.init"
409           description="starts the tomcat server with remote debugging enabled">
410     <echo message="Starting Tomcat from ${org.bedework.appserver.dir}"/>
411     <java fork="true" dir="${basedir}"
412           classname="org.apache.catalina.startup.Bootstrap">
413       <classpath>
414         <pathelement path="${org.bedework.appserver.dir}/bin/bootstrap.jar"/>
415       </classpath>
416       <sysproperty key="catalina.home" value="${org.bedework.appserver.dir}"/>
417       <!--jvmarg value="-Dcatalina.home=${tomcat.dir}"/-->
418       <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
419       <jvmarg value="-Xdebug"/>
420       <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"/>
421       <arg value="start"/>
422     </java>
423   </target>
424
425   <!-- This target is for use when sync4j is installed -->
426   <target name="tomcatstart-sync4j" depends="run.init"
427           description="starts the tomcat server with sync4j">
428     <echo message="Starting Tomcat with sync4j"/>
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="-Dsync4j.home=${sync4j.dir}"/>
437       <arg value="start"/>
438     </java>
439   </target>
440
441   <!-- =================================================================
442        The "tomcatstop" target stops Tomcat cleanly
443        ================================================================= -->
444
445   <target name="tomcatstop" depends="run.init">
446     <echo message="Stopping Tomcat"/>
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       <arg value="stop"/>
455     </java>
456   </target>
457 </project>
Note: See TracBrowser for help on using the browser.