root/trunk/build/quickstart/build.xml

Revision 1944 (checked in by douglm, 5 years ago)

Changes to get an install script working

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