root/trunk/build/quickstart-build.xml

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

Javadoc chnages.

Add javadoc target to quickstart

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