root/trunk/build/quickstart/build.xml

Revision 2560 (checked in by douglm, 3 years ago)

Build script to generate the tzdata.zip file needed for the timezones server.

Execute with command of form

./bw -zoneinfo -version 2009t -tzdata /home/douglm/drop2/calendar/timezones/olson/tzdata2009t.tar.gz

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   <dirname property="bedework.quickstart.basedir"
15                file="${ant.file.quickstart-build-file}"/>
16
17   <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
18
19   <import file="${bedework.quickstart.basedir}/run-activemq.xml" />
20   <import file="${bedework.quickstart.basedir}/run-hsqldb.xml" />
21   <import file="${bedework.quickstart.basedir}/run-tomcat.xml" />
22   <import file="${bedework.quickstart.basedir}/run-dir.xml" />
23   <import file="${bedework.quickstart.basedir}/install.xml" />
24
25   <!-- Bedework services -->
26   <import file="${bedework.quickstart.basedir}/run-logger.xml" />
27   <import file="${bedework.quickstart.basedir}/run-indexer.xml" />
28   <import file="${bedework.quickstart.basedir}/run-inoutscheduler.xml" />
29
30   <target name="README" depends="init"
31           description="Describe targets and their usage">
32     <loadfile property="org.bedework.README" srcFile="${org.bedework.calendar.dir}/docs/README"/>
33     <echo message="${org.bedework.README}" />
34   </target>
35
36   <echo message="Load user properties from ${org.bedework.user.build.properties}" />
37
38   <!-- Load user property definition overrides -->
39   <property file="${org.bedework.user.build.properties}" />
40
41   <!-- This may have defined the config properties location. Load that now to get overrides
42   <property file="${org.bedework.config.properties}" />-->
43
44   <import file="${bedework.quickstart.basedir}/../loadDeployConfig.xml"/>
45
46   <target name="usage" depends="init"
47           description="Describe targets and their usage">
48     <echo level="info" message="As distributed the package should be ready to go."/>
49     <echo level="info" message="Ensure ant is on your path, (a version is in the" />
50     <echo level="info" message="package)"/>
51     <echo level="info" message=""/>
52     <echo level="info" message="First in one window do"/>
53     <echo level="info" message="    ant hsqldb"/>
54     <echo level="info" message="This will start the hsqldb server ready for the "/>
55     <echo level="info" message="application."/>
56     <echo level="info" message=""/>
57     <echo level="info" message="In another window do"/>
58     <echo level="info" message="    ant tomcatstart"/>
59     <echo level="info" message=""/>
60     <echo level="info" message="Once tomcat is running you should be able to go to a"/>
61     <echo level="info" message="browser and connect to"/>
62     <echo level="info" message="    http://localhost:8080/bedework"/>
63     <echo level="info" message="and follow the instructions."/>
64     <echo level="info" message=""/>
65     <echo level="info" message="To build the calendar do"/>
66     <echo level="info" message="    ant deploy    or "/>
67     <echo level="info" message="    ant deploy.debug "/>
68     <echo level="info" message="which does a build and deploy of all components"/>
69     <echo level="info" message=""/>
70     <echo level="info" message="To rebuild the calendar do"/>
71     <echo level="info" message="    ant clean.deploy    or "/>
72     <echo level="info" message="    ant clean.deploy.debug "/>
73     <echo level="info" message="which does a clean, build and deploy of all components"/>
74     <echo level="info" message=""/>
75     <echo level="info" message="See documentation in the docs directory or on bedework.org"/>
76     <echo level="info" message="for instructions on creating a locally configured calendar application"/>
77     <echo level="info" message=""/>
78   </target>
79
80    <!-- The only properties set below should be those directly used to
81         invoke the targets below, in this file.
82         Do not set properties here for tasks invoked in other build
83         files.  Instead, make sure the targets work in calendar/build.xml,
84         then invoke ant on the task in calendar/build.xml.
85
86         For an example, of invoking ant on another build file,
87         see the deploy target, below.
88      -->
89   <target name="init" >
90     <dirname property="quickstart.dir" file="${ant.file}"/>
91
92     <property name="org.bedework.project.bedework"
93               location="${basedir}/bedework" />
94
95     <property name="org.bedework.config.base"
96               location="${org.bedework.project.bedework}/config" />
97
98     <property name="bedework.build.file"
99               location="${basedir}/bedework/build.xml" />
100     <dirname property="org.bedework.configuration.location"
101              file="${org.bedework.user.build.properties}" />
102
103     <!-- Unfortunately it sits on top of everything
104     <splash imageurl="file://${org.bedework.project.bedework}/docs/icons/bedeworkLogo.gif"/>
105     -->
106   </target>
107
108   <target name="run.init" depends="init" >
109     <property name="org.bedework.appserver.dir"
110               location="${org.bedework.project.bedework}/../apache-tomcat-5.5.17" />
111
112     <property name="org.bedework.hsqldb.dir"
113               location="${org.bedework.project.bedework}/../hsqldb-1.7.3.3" />
114
115     <property name="org.bedework.directory.dir"
116               location="${org.bedework.project.bedework}/../apacheds-1.5.3-fixed" />
117
118     <property name="org.bedework.activemq.dir"
119               location="${org.bedework.project.bedework}/../apache-activemq-5.2.0" />
120   </target>
121
122   <!-- =================================================================
123        The "build" target builds the jar files
124        ================================================================= -->
125
126   <target name="build" depends="init"
127           description="builds the jars">
128     <ant antfile="${bedework.build.file}" inheritrefs="true"
129            target="build" />
130     <tstamp prefix="endbuild" />
131     <echo level="info" message="=================> Build finished at ${endbuild.TODAY}" />
132   </target>
133
134   <target name="clean.build" depends="clean"
135           description="cleans then builds the jars">
136     <ant antfile="${bedework.build.file}" inheritrefs="true"
137            target="clean.build" />
138   </target>
139
140   <!-- =================================================================
141        The "deploy" target builds and deploys the applications
142        ================================================================= -->
143
144   <target name="deploy" depends="init"
145           description="builds and deploys the applications">
146     <ant antfile="${bedework.build.file}" inheritrefs="true"
147            target="deploy" />
148   </target>
149
150   <target name="deploy.debug" depends="init"
151           description="builds and deploys the applications">
152     <ant antfile="${bedework.build.file}" inheritrefs="true"
153            target="deploy.debug" />
154     <tstamp>
155       <format property="deploydebug.time" pattern="MM/dd/yyyy HH:mm:ss"/>
156     </tstamp>
157
158     <echo level="info" message="=================> deploy.debug finished at ${deploydebug.time}" />
159   </target>
160
161   <!-- =================================================================
162        The "clean.deploy" target cleans, builds and deploys the applications
163        ================================================================= -->
164
165   <target name="clean" depends="init"
166           description="Remove all generated files.">
167     <ant antfile="${bedework.build.file}" inheritrefs="true"
168            target="clean" />
169   </target>
170
171   <target name="quickstart-clean" depends="init"
172           description="partial clean up for quickstart.">
173     <ant antfile="${bedework.build.file}" inheritrefs="true"
174            target="quickstart-clean" />
175   </target>
176
177   <target name="clean.deploy" depends="init"
178           description="builds and deploys the applications">
179     <ant antfile="${bedework.build.file}" inheritrefs="true"
180            target="clean.deploy" />
181   </target>
182
183   <target name="clean.deploy.debug" depends="init"
184           description="builds and deploys the applications">
185     <ant antfile="${bedework.build.file}" inheritrefs="true"
186            target="clean.deploy.debug" />
187   </target>
188
189   <!-- =================================================================
190        The "build.configured" target builds configured applications
191        ================================================================= -->
192
193   <target name="build.configured" depends="init"
194           description="Build configured applications" >
195     <ant antfile="${bedework.build.file}" inheritrefs="true"
196            target="build.configured" />
197   </target>
198
199   <target name="build.configured.debug" depends="init"
200           description="Build configured applications" >
201     <ant antfile="${bedework.build.file}" inheritrefs="true"
202            target="build.configured.debug" />
203   </target>
204
205   <target name="clean.build.configured" depends="init"
206           description="Build configured applications" >
207     <ant antfile="${bedework.build.file}" inheritrefs="true"
208            target="clean.build.configured" />
209   </target>
210
211   <target name="clean.build.configured.debug" depends="init"
212           description="Build configured applications" >
213     <ant antfile="${bedework.build.file}" inheritrefs="true"
214            target="clean.build.configured.debug" />
215   </target>
216
217   <!-- =================================================================
218        Build and run the cmdline utility
219        ================================================================= -->
220
221   <target name="cmdutil" depends="init"
222           description="run the cmdline utility">
223     <antfetch antfile="${bedework.build.file}" inheritall="true"
224               target="cmdutil"
225               return="org.bedework.cmdutil.status" >
226     </antfetch>
227   </target>
228
229   <!-- =================================================================
230        The "javadoc" target builds javadocs for all projects
231        ================================================================= -->
232
233   <target name="javadoc" depends="init"
234           description="Build javadocs" >
235     <ant antfile="${bedework.build.file}" inheritrefs="true"
236          target="javadoc" />
237   </target>
238
239   <!-- =================================================================
240        The "run.test" target builds and runs tests
241        ================================================================= -->
242
243   <target name="run.test" depends="init"
244           description="builds and runs the tests">
245     <ant antfile="${bedework.build.file}" inheritrefs="true"
246            target="run.test" />
247   </target>
248
249   <!-- =================================================================
250        The "start" target starts all quickstart components
251        ================================================================= -->
252
253   <target name="start" depends="run.init"
254           description="Start quickstart system" >
255     <parallel>
256       <antcall target="activemq" inheritrefs="true" />
257       <antcall target="dirstart" inheritrefs="true" />
258       <antcall target="hsqldb" inheritrefs="true" />
259
260       <sequential>
261         <!-- wait for activemq -->
262         <waitfor maxwait="3" maxwaitunit="minute" checkevery="250">
263            <socket server="localhost" port="8161"/>
264         </waitfor>
265
266         <!-- wait for the directory server -->
267         <waitfor maxwait="3" maxwaitunit="minute" checkevery="250">
268            <socket server="localhost" port="10389"/>
269         </waitfor>
270
271         <parallel>
272           <!-- Start the bedework non-web services -->
273           <antcall target="start-logger" inheritrefs="true" />
274
275           <antcall target="start-indexer" inheritrefs="true" />
276                
277           <antcall target="start-inoutscheduler" inheritrefs="true" />
278
279           <antcall target="tomcatstart" inheritrefs="true" />
280         </parallel>
281       </sequential>
282     </parallel>
283   </target>
284
285   <!-- =================================================================
286        The "start-debug" target starts the quickstart infrastructure components
287        ================================================================= -->
288
289   <target name="start-debug" depends="run.init"
290           description="Start quickstart system" >
291     <parallel>
292       <antcall target="activemq" inheritrefs="true" />
293       <antcall target="dirstart" inheritrefs="true" />
294       <antcall target="hsqldb" inheritrefs="true" />
295     </parallel>
296   </target>
297 </project>
Note: See TracBrowser for help on using the browser.