root/trunk/build/quickstart-build.xml

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

To build bedework after this update will require ant-contrib.jar to be added to apache-ant-1.6.5/lib
This will be done in the preview quickstart

Upgraded portlet support. Managed to display the user calendar in liferay4.
Made much more of the portlet support common. Moved many config settings into the properties file.
Some changes still needed

Moved portlet stylesheets into common portlet directory

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