root/trunk/build/quickstart/build.xml

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

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