root/trunk/build/quickstart/build.xml

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

Handle entity and collection deletion in indexer

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