root/trunk/build.xml

Revision 1122 (checked in by douglm, 6 years ago)

Javadoc chnages.

Add javadoc target to quickstart

Line 
1 <?xml version="1.0"?>
2
3 <!-- This is the ant build file for the bedework uber project.
4
5      Authors: Mike Douglass   douglm @ rpi.edu
6 -->
7
8 <project name="bedework.build" default="usage" basedir=".">
9   <property environment="env"/>
10
11   <!-- this project -->
12   <property name="org.bedework.project.bedework"
13             location="${basedir}" />
14
15   <!-- Where we put other projects -->
16   <property name="org.bedework.projects"
17             location="${org.bedework.project.bedework}/projects" />
18
19   <property name="org.bedework.project.access"
20             location="${org.bedework.projects}/access" />
21
22   <property name="org.bedework.project.bwtools"
23             location="${org.bedework.projects}/bwtools" />
24
25   <property name="org.bedework.project.caldav"
26             location="${org.bedework.projects}/caldav" />
27
28   <property name="org.bedework.project.caldavTest"
29             location="${org.bedework.projects}/caldavTest" />
30
31   <property name="org.bedework.project.calendarapi"
32             location="${org.bedework.projects}/calendarapi" />
33
34   <property name="org.bedework.project.davutil"
35             location="${org.bedework.projects}/davutil" />
36
37   <property name="org.bedework.project.dumprestore"
38             location="${org.bedework.projects}/dumprestore" />
39
40   <property name="org.bedework.project.freebusy"
41             location="${org.bedework.projects}/freebusy" />
42
43   <property name="org.bedework.project.rpiutil"
44             location="${org.bedework.projects}/rpiutil" />
45
46   <property name="org.bedework.project.synchml"
47             location="${org.bedework.projects}/synchml" />
48
49   <property name="org.bedework.project.webapps"
50             location="${org.bedework.projects}/webapps" />
51
52   <property name="org.bedework.project.webdav"
53             location="${org.bedework.projects}/webdav" />
54
55   <target name="README" depends="init"
56           description="Describe targets and their usage">
57     <loadfile property="org.bedework.README"
58               srcFile="${org.bedework.project.bedework}/docs/README"/>
59     <echo message="${org.bedework.README}" />
60   </target>
61
62   <target name="usage" depends="init"
63           description="Describe targets and their usage">
64     <echo message="As distributed the package should be ready to go."/>
65     <echo message="Ensure ant is on your path, (a version is in the" />
66     <echo message="package)"/>
67     <echo message=""/>
68     <echo message="First in one window do"/>
69     <echo message="    ant hsqldb"/>
70     <echo message="This will start the hsqldb server ready for the "/>
71     <echo message="application."/>
72     <echo message=""/>
73     <echo message="In another window do"/>
74     <echo message="    ant tomcatstart"/>
75     <echo message=""/>
76     <echo message="Once tomcat is running you should be able to go to a"/>
77     <echo message="browser and connect to"/>
78     <echo message="    http://localhost:8080/bedework"/>
79     <echo message="and follow the instructions."/>
80     <echo message=""/>
81     <echo message="To build the calendar do"/>
82     <echo message="    ant deploy    or "/>
83     <echo message="    ant deploy.debug "/>
84     <echo message="which does a build and deploy of all components"/>
85     <echo message=""/>
86     <echo message="To rebuild the calendar do"/>
87     <echo message="    ant clean.deploy    or "/>
88     <echo message="    ant clean.deploy.debug "/>
89     <echo message="which does a clean, build and deploy of all components"/>
90     <echo message=""/>
91     <echo message="See documentation in the docs directory or on bedework.org"/>
92     <echo message="for instructions on creating a locally configured calendar application"/>
93     <echo message=""/>
94   </target>
95
96   <target name="init" >
97     <property name="org.bedework.qs.build.synchml" value="yes" />
98
99     <!-- Overriding this when invoking ant allows different user property
100          files to be included e.g.
101             ant -Dorg.bedework.user.build.properties=/home/me/bedework.properties ...
102             -->
103     <property name="org.bedework.user.build.properties"
104               location="${user.home}/bedework.build.properties" />
105
106     <echo message="Load user properties from ${org.bedework.user.build.properties}" />
107
108     <!-- Load user property definition overrides -->
109     <property file="${org.bedework.user.build.properties}" />
110
111     <!-- ===============================================================
112               Default properties.
113          =============================================================== -->
114
115     <property name="project.home" location="${org.bedework.project.bedework}"/>
116
117     <property file="${project.home}/build.properties" />
118
119     <property name="project.name" value="${org.bedework.package.name}"/>
120     <property name="project.version" value="${org.bedework.version}"/>
121
122     <property name="dist.home" location="${project.home}/dist"/>
123     <property name="lib.dir" location="${project.home}/lib"/>
124     <property name="bin.home" location="${project.home}/bin"/>
125
126     <property name="build.dir" location="${project.home}/build"/>
127     <property name="buildjar" location="${build.dir}/buildjar.xml"/>
128     <property name="buildsh" location="${build.dir}/buildsh.xml"/>
129     <property name="buildwar" location="${build.dir}/buildwar.xml"/>
130
131     <property name="org.bedework.build.caldav" value="yes" />
132
133     <condition property="org.bedework.qs.build.caldav">
134       <equals arg1="yes" arg2="${org.bedework.build.caldav}"/>
135     </condition>
136
137     <property name="org.bedework.build.freebusy" value="no" />
138
139     <condition property="org.bedework.qs.build.freebusy">
140       <equals arg1="yes" arg2="${org.bedework.build.freebusy}"/>
141     </condition>
142
143     <mkdir dir="${dist.home}" />
144
145     <mkdir dir="${bin.home}" />
146
147     <property name="org.bedework.empty.dir"
148               location="${dist.home}/empty-dir" />
149     <mkdir dir="${org.bedework.empty.dir}" />
150
151     <fileset id="empty.fileset" dir="${org.bedework.empty.dir}"
152              excludes="*" />
153     <!-- default to empty -->
154     <fileset id="base.resource.files" refid="empty.fileset" />
155
156     <!-- ==================== Subcomponent Compilation Classpath ==================== -->
157
158     <path id="compile.classpath">
159       <fileset dir="${lib.dir}">
160          <include name="*.jar"/>
161       </fileset>
162       <fileset dir="${dist.home}">
163          <include name="*.jar"/>
164       </fileset>
165     </path>
166
167     <!-- ===============================================================
168               Locations and jar files built by this project.
169          =============================================================== -->
170
171     <property name="org.bedework.temp.dir"
172               location="${dist.home}/temp" />
173
174     <property name="org.bedework.temp.wars.home"
175               location="${org.bedework.temp.dir}/wars" />
176
177     <property name="org.bedework.temp.shellscr.home"
178               location="${org.bedework.temp.dir}/shellscr" />
179
180     <property name="org.bedework.config.base"
181               location="${org.bedework.project.bedework}/config" />
182
183     <property name="org.bedework.default.lib"
184               location="${org.bedework.project.bedework}/lib" />
185
186     <property name="org.bedework.deployment.base"
187               location="${org.bedework.project.bedework}/deployment" />
188
189     <property name="org.bedework.deployutil.jar"
190               location="${bin.home}/${org.bedework.deployutil.jar.name}-${project.version}.jar" />
191
192     <!-- ===============================================================
193               Default properties.
194          =============================================================== -->
195     <property file="${org.bedework.defaultdefs.properties}" />
196   </target>
197
198   <target name="init.build" depends="init">
199     <mkdir dir="${dist.home}" />
200
201     <mkdir dir="${bin.home}" />
202
203     <mkdir dir="${org.bedework.empty.dir}" />
204   </target>
205
206   <!-- =================================================================
207        "build" and "clean" targets for the project - does not build
208        subsidiary projects like rpiutil and access
209        ================================================================= -->
210
211   <target name="build" depends="init.build,build.rpiutil,build.access,build.davutil,
212                                 build.calendarapi,build.dumprestore,build.synchml,
213                                 build.webdav,build.caldav,build.caldavTest,
214                                 build.freebusy,build.bwtools,build.webapps,
215                                 build.deployutil"
216           description="builds the project"/>
217
218   <target name="clean" depends="init,clean.rpiutil,clean.access,clean.davutil,
219                                 clean.calendarapi,clean.dumprestore,clean.synchml,
220                                 clean.webdav,clean.caldav,clean.caldavTest,
221                                 clean.freebusy,clean.bwtools,clean.webapps"
222           description="Remove all generated files.">
223     <delete dir="${dist.home}" />
224     <delete dir="${bin.home}" />
225   </target>
226
227   <target name="quickstart-clean" depends="init,clean.rpiutil,clean.access,clean.davutil,
228                                            clean.calendarapi,clean.dumprestore,clean.synchml,
229                                            clean.webdav,clean.caldav,clean.caldavTest,
230                                            clean.freebusy,clean.bwtools,clean.webapps"
231           description="partial clean up for quickstart.">
232     <delete dir="${bin.home}" />
233     <delete dir="${org.bedework.temp.dir}" />
234     <delete dir="${org.bedework.empty.dir}" />
235
236     <delete>
237       <fileset dir="${dist.home}" includes="*.war"/>
238     </delete>
239   </target>
240
241   <target name="clean.build" depends="clean, build"
242           description="cleans then builds the project"/>
243
244   <!-- =================================================================
245        The "deploy" and "deploy.all" target builds and deploys the applications
246        ================================================================= -->
247
248   <target name="deploy.debug" depends="build"
249           description="builds and deploys the applications">
250     <ant antfile="${org.bedework.project.bedework}/deployment/build.xml" inheritrefs="true"
251          target="deploy"  >
252       <property name="app.debug.val" value="9" />
253     </ant>
254   </target>
255
256   <target name="deploy" depends="build"
257           description="builds and deploys the applications">
258     <ant antfile="${org.bedework.project.bedework}/deployment/build.xml" inheritrefs="true"
259          target="deploy" />
260   </target>
261
262   <!-- =================================================================
263        The "clean.deploy" target cleans, builds and deploys the applications
264        ================================================================= -->
265
266   <target name="clean.deploy" depends="clean,deploy" />
267
268   <target name="clean.deploy.debug" depends="clean,deploy.debug" />
269
270   <!-- =================================================================
271        The "build.configured" target builds configured applications
272        ================================================================= -->
273
274   <target name="build.configured" depends="build"
275           description="Build configured applications" >
276     <ant antfile="${org.bedework.project.bedework}/deployment}/build.xml" inheritrefs="true"
277          target="build.configured"  >
278       <property name="app.debug.val" value="9" />
279     </ant>
280   </target>
281
282   <target name="build.configured.debug" depends="build"
283           description="Build configured applications" >
284     <ant antfile="${org.bedework.project.bedework}/deployment}/build.xml" inheritrefs="true"
285          target="build.configured" />
286   </target>
287
288   <target name="clean.build.configured" depends="clean,build.configured" />
289
290   <target name="clean.build.configured.debug" depends="clean,build.configured.debug"/>
291
292   <!-- ======================== javadoc target =======================
293        ================================================================= -->
294
295   <target name="javadoc" depends="init" description="Generate javadoc">
296     <ant antfile="${org.bedework.project.access}/build.xml" inheritall="false"
297          target="javadoc" />
298     <ant antfile="${org.bedework.project.bwtools}/build.xml" inheritall="false"
299          target="javadoc" />
300     <ant antfile="${org.bedework.project.caldav}/build.xml" inheritall="false"
301          target="javadoc" />
302     <ant antfile="${org.bedework.project.caldavTest}/build.xml" inheritall="false"
303          target="javadoc" />
304     <ant antfile="${org.bedework.project.calendarapi}/build.xml" inheritall="false"
305          target="javadoc" />
306     <ant antfile="${org.bedework.project.davutil}/build.xml" inheritall="false"
307          target="javadoc" />
308     <ant antfile="${org.bedework.project.dumprestore}/build.xml" inheritall="false"
309          target="javadoc" />
310     <ant antfile="${org.bedework.project.freebusy}/build.xml" inheritall="false"
311          target="javadoc" />
312     <ant antfile="${org.bedework.project.rpiutil}/build.xml" inheritall="false"
313          target="javadoc" />
314     <ant antfile="${org.bedework.project.synchml}/build.xml" inheritall="false"
315          target="javadoc" />
316     <ant antfile="${org.bedework.project.webapps}/build.xml" inheritall="false"
317          target="javadoc" />
318     <ant antfile="${org.bedework.project.webdav}/build.xml" inheritall="false"
319          target="javadoc" />
320   </target>
321
322   <!-- =================================================================
323        Targets to build sub-projects and copy the results into dependent
324        libraries. Each sub-project generates a libapi directory which
325        contains the public api for that project.
326        ================================================================= -->
327
328   <!-- .................................................................
329                           access
330        .................................................................. -->
331   <target name="build.access" depends="init"
332           description="builds the access project">
333     <ant antfile="${org.bedework.project.access}/build.xml" inheritall="false"
334            target="build-all" />
335
336     <copy-to-dependent this="${org.bedework.project.access}"
337                        target="${org.bedework.project.caldav}" />
338     <copy-to-dependent this="${org.bedework.project.access}"
339                        target="${org.bedework.project.calendarapi}" />
340     <copy-to-dependent this="${org.bedework.project.access}"
341                        target="${org.bedework.project.davutil}" />
342     <copy-to-dependent this="${org.bedework.project.access}"
343                        target="${org.bedework.project.dumprestore}" />
344     <copy-to-dependent this="${org.bedework.project.access}"
345                        target="${org.bedework.project.webapps}" />
346     <copy-to-dependent this="${org.bedework.project.access}"
347                        target="${org.bedework.project.webdav}" />
348
349     <copy-to-bin this="${org.bedework.project.access}"/>
350   </target>
351
352   <target name="clean.access" depends="init"
353           description="cleans the access project">
354     <ant antfile="${org.bedework.project.access}/build.xml" inheritall="false"
355            target="deep-clean" />
356   </target>
357
358   <target name="clean.build.access" depends="clean.access,build.access"
359           description="builds the access project"/>
360
361   <!-- .................................................................
362                           bwtools
363        .................................................................. -->
364   <target name="build.bwtools" depends="init"
365           description="builds the bwtools project">
366     <ant antfile="${org.bedework.project.bwtools}/build.xml" inheritall="false"
367            target="build-all" />
368
369     <copy-to-bin this="${org.bedework.project.bwtools}"/>
370   </target>
371
372   <target name="clean.bwtools" depends="init"
373           description="clean the bwtools project">
374     <ant antfile="${org.bedework.project.bwtools}/build.xml" inheritall="false"
375            target="deep-clean" />
376   </target>
377
378   <target name="clean.build.bwtools" depends="clean.bwtools,build.bwtools"
379           description="builds the bwtools project"/>
380
381   <!-- .................................................................
382                           caldav
383        .................................................................. -->
384   <target name="build.caldav" depends="init"
385           description="builds the caldav project">
386     <if>
387       <isset property="org.bedework.qs.build.caldav"/>
388       <then>
389         <ant antfile="${org.bedework.project.caldav}/build.xml" inheritall="false"
390              target="build-all" />
391
392       <copy-to-bin this="${org.bedework.project.caldav}"/>
393       </then>
394     </if>
395   </target>
396
397   <target name="clean.caldav" depends="init"
398           description="clean the caldav project">
399     <if>
400       <isset property="org.bedework.qs.build.caldav"/>
401       <then>
402         <ant antfile="${org.bedework.project.caldav}/build.xml" inheritall="false"
403              target="deep-clean" />
404       </then>
405     </if>
406   </target>
407
408   <target name="clean.build.caldav" depends="clean.caldav,build.caldav"
409           description="clean builds the caldav project"/>
410
411   <!-- .................................................................
412                           caldavTest
413        .................................................................. -->
414   <target name="build.caldavTest" depends="init"
415           description="builds the caldavTest project">
416     <if>
417       <isset property="org.bedework.qs.build.caldav"/>
418       <then>
419         <ant antfile="${org.bedework.project.caldavTest}/build.xml" inheritall="false"
420              target="build-all" />
421
422         <copy-to-bin this="${org.bedework.project.caldavTest}"/>
423       </then>
424     </if>
425   </target>
426
427   <target name="clean.caldavTest" depends="init"
428           description="clean the caldavTest project">
429     <if>
430       <isset property="org.bedework.qs.build.caldav"/>
431       <then>
432         <ant antfile="${org.bedework.project.caldavTest}/build.xml" inheritall="false"
433              target="deep-clean" />
434       </then>
435     </if>
436   </target>
437
438   <target name="clean.build.caldavTest" depends="clean.caldavTest,build.caldavTest"
439           description="clean builds the caldavTest project"/>
440
441   <!-- .................................................................
442                           calendarapi
443        .................................................................. -->
444   <target name="build.calendarapi" depends="init"
445           description="builds the calendar project">
446     <ant antfile="${org.bedework.project.calendarapi}/build.xml" inheritall="false"
447            target="build-all" />
448
449     <copy-to-dependent this="${org.bedework.project.calendarapi}"
450                        target="${org.bedework.project.caldav}" />
451     <copy-to-dependent this="${org.bedework.project.calendarapi}"
452                        target="${org.bedework.project.dumprestore}" />
453     <copy-special-to-dependent this="${org.bedework.project.calendarapi}"
454                        target="${org.bedework.project.dumprestore}"
455                        prefix="bw-calcore" />
456     <copy-special-to-dependent this="${org.bedework.project.calendarapi}"
457                        target="${org.bedework.project.dumprestore}"
458                        prefix="bw-calsvc" />
459     <copy-to-dependent this="${org.bedework.project.calendarapi}"
460                        target="${org.bedework.project.freebusy}" />
461     <copy-to-dependent this="${org.bedework.project.calendarapi}"
462                        target="${org.bedework.project.synchml}" />
463     <copy-to-dependent this="${org.bedework.project.calendarapi}"
464                        target="${org.bedework.project.webapps}" />
465
466     <copy-to-bin this="${org.bedework.project.calendarapi}"/>
467   </target>
468
469   <target name="clean.calendarapi" depends="init"
470           description="clean the calendar project">
471     <ant antfile="${org.bedework.project.calendarapi}/build.xml" inheritall="false"
472            target="deep-clean" />
473   </target>
474
475   <target name="clean.build.calendarapi" depends="clean.calendarapi,build.calendarapi"
476           description="clean builds the caldavTest project"/>
477
478   <!-- .................................................................
479                           davutil
480        .................................................................. -->
481   <target name="build.davutil" depends="init"
482           description="builds the davutil project">
483     <ant antfile="${org.bedework.project.davutil}/build.xml" inheritall="false"
484            target="build-all" />
485
486     <copy-to-dependent this="${org.bedework.project.davutil}"
487                        target="${org.bedework.project.caldav}" />
488     <copy-to-dependent this="${org.bedework.project.davutil}"
489                        target="${org.bedework.project.caldavTest}" />
490     <copy-to-dependent this="${org.bedework.project.davutil}"
491                        target="${org.bedework.project.calendarapi}" />
492     <copy-to-dependent this="${org.bedework.project.davutil}"
493                        target="${org.bedework.project.freebusy}" />
494     <copy-to-dependent this="${org.bedework.project.davutil}"
495                        target="${org.bedework.project.webapps}" />
496     <copy-to-dependent this="${org.bedework.project.davutil}"
497                        target="${org.bedework.project.webdav}" />
498
499     <copy-to-bin this="${org.bedework.project.davutil}"/>
500   </target>
501
502   <target name="clean.davutil" depends="init"
503           description="cleans the davutil project">
504     <ant antfile="${org.bedework.project.davutil}/build.xml" inheritall="false"
505            target="deep-clean" />
506   </target>
507
508   <target name="clean.build.davutil" depends="clean.davutil,build.davutil"
509           description="clean builds the davutil project"/>
510
511   <!-- .................................................................
512                           dumprestore
513        .................................................................. -->
514   <target name="build.dumprestore" depends="init"
515           description="builds the dumprestore project">
516     <ant antfile="${org.bedework.project.dumprestore}/build.xml" inheritall="false"
517            target="build-all" />
518
519     <copy-to-bin this="${org.bedework.project.dumprestore}"/>
520   </target>
521
522   <target name="clean.dumprestore" depends="init"
523           description="clean the dumprestore project">
524     <ant antfile="${org.bedework.project.dumprestore}/build.xml" inheritall="false"
525            target="deep-clean" />
526   </target>
527
528   <target name="clean.build.dumprestore" depends="clean.dumprestore,build.dumprestore"
529           description="builds the dumprestore project"/>
530
531   <!-- .................................................................
532                           freebusy
533        .................................................................. -->
534   <target name="build.freebusy" depends="init"
535           description="builds the freebusy project">
536     <if>
537       <isset property="org.bedework.qs.build.freebusy"/>
538       <then>
539         <ant antfile="${org.bedework.project.freebusy}/build.xml" inheritall="false"
540              target="build-all" />
541
542         <copy-to-bin this="${org.bedework.project.freebusy}"/>
543       </then>
544     </if>
545   </target>
546
547   <target name="clean.freebusy" depends="init"
548           description="cleans the freebusy project">
549     <if>
550       <isset property="org.bedework.qs.build.freebusy"/>
551       <then>
552         <ant antfile="${org.bedework.project.freebusy}/build.xml" inheritall="false"
553              target="deep-clean" />
554       </then>
555     </if>
556   </target>
557
558   <target name="clean.build.freebusy" depends="clean.freebusy,build.freebusy"
559           description="builds the freebusy project"/>
560
561   <!-- .................................................................
562                           rpiutil
563        .................................................................. -->
564   <target name="build.rpiutil" depends="init"
565           description="builds the rpiutil project">
566     <ant antfile="${org.bedework.project.rpiutil}/build.xml" inheritall="false"
567            target="build-all" />
568
569     <copy-to-dependent this="${org.bedework.project.rpiutil}"
570                        target="${org.bedework.project.access}" />
571     <copy-to-dependent this="${org.bedework.project.rpiutil}"
572                        target="${org.bedework.project.caldav}" />
573     <copy-to-dependent this="${org.bedework.project.rpiutil}"
574                        target="${org.bedework.project.calendarapi}" />
575     <copy-to-dependent this="${org.bedework.project.rpiutil}"
576                        target="${org.bedework.project.davutil}" />
577     <copy-to-dependent this="${org.bedework.project.rpiutil}"
578                        target="${org.bedework.project.dumprestore}" />
579     <copy-to-dependent this="${org.bedework.project.rpiutil}"
580                        target="${org.bedework.project.freebusy}" />
581     <copy-to-dependent this="${org.bedework.project.rpiutil}"
582                        target="${org.bedework.project.webapps}" />
583     <copy-to-dependent this="${org.bedework.project.rpiutil}"
584                        target="${org.bedework.project.webdav}" />
585
586     <copy-to-bin this="${org.bedework.project.rpiutil}"/>
587   </target>
588
589   <target name="clean.rpiutil" depends="init"
590           description="cleans the rpiutil project">
591     <ant antfile="${org.bedework.project.rpiutil}/build.xml" inheritall="false"
592            target="deep-clean" />
593   </target>
594
595   <target name="clean.build.rpiutil" depends="clean.rpiutil,build.rpiutil"
596           description="builds the rpiutil project"/>
597
598   <!-- .................................................................
599                           synchml
600        .................................................................. -->
601   <target name="build.synchml" depends="init"
602           description="builds the synchml project">
603     <if>
604       <isset property="org.bedework.qs.build.synchml"/>
605       <then>
606         <ant antfile="${org.bedework.project.synchml}/build.xml" inheritall="false"
607              target="build-all" />
608
609         <copy-to-bin this="${org.bedework.project.synchml}"/>
610       </then>
611     </if>
612   </target>
613
614   <target name="clean.synchml" depends="init"
615           description="clean the synchml project">
616     <if>
617       <isset property="org.bedework.qs.build.synchml"/>
618       <then>
619         <ant antfile="${org.bedework.project.synchml}/build.xml" inheritall="false"
620              target="deep-clean" />
621       </then>
622     </if>
623   </target>
624
625   <target name="clean.build.synchml" depends="clean.synchml,clean.synchml"
626           description="builds the synchml project"/>
627
628   <!-- .................................................................
629                           webapps
630        .................................................................. -->
631   <target name="build.webapps" depends="init"
632           description="builds the webapps project">
633     <ant antfile="${org.bedework.project.webapps}/build.xml" inheritall="false"
634            target="build-all" />
635
636     <copy-to-bin this="${org.bedework.project.webapps}"/>
637   </target>
638
639   <target name="clean.webapps" depends="init"
640           description="clean the webapps project">
641     <ant antfile="${org.bedework.project.webapps}/build.xml" inheritall="false"
642            target="deep-clean" />
643   </target>
644
645   <target name="clean.build.webapps" depends="clean.webapps,build.webapps"
646           description="builds the webapps project"/>
647
648   <!-- .................................................................
649                           webdav
650        .................................................................. -->
651   <target name="build.webdav" depends="init"
652           description="builds the webdav project">
653     <if>
654       <isset property="org.bedework.qs.build.caldav"/>
655       <then>
656         <ant antfile="${org.bedework.project.webdav}/build.xml" inheritall="false"
657              target="build-all" />
658
659         <copy-to-dependent this="${org.bedework.project.webdav}"
660                            target="${org.bedework.project.caldav}" />
661
662         <copy-to-bin this="${org.bedework.project.webdav}"/>
663       </then>
664     </if>
665   </target>
666
667   <target name="clean.webdav" depends="init"
668           description="cleans the webdav project">
669     <if>
670       <isset property="org.bedework.qs.build.caldav"/>
671       <then>
672         <ant antfile="${org.bedework.project.webdav}/build.xml" inheritall="false"
673              target="deep-clean" />
674       </then>
675     </if>
676   </target>
677
678   <target name="clean.build.webdav" depends="clean.webdav,build.webdav"
679           description="builds the webdav project"/>
680
681   <!-- =================================================================
682        Targets to build sub-components of this project.
683        ================================================================= -->
684
685   <target name="build.deployutil" depends="init"
686           description="builds the deployutil component">
687     <ant antfile="${org.bedework.project.bedework}/deployutil/build.xml" inheritrefs="true"
688            target="build" >
689       <property name="build.jar.file" location="${org.bedework.deployutil.jar}" />
690     </ant>
691   </target>
692
693   <!-- =================================================================
694        Build and run the unit test suite
695        ================================================================= -->
696
697   <target name="bld.test" depends="init"
698           description="Build and run tests">
699     <ant antfile="${calendar.build.file}" inheritrefs="true"
700          target="bld.test" />
701   </target>
702
703   <target name="run.test" depends="init"
704           description="Build and run tests">
705     <ant antfile="${calendar.build.file}" inheritrefs="true"
706          target="run.test" />
707   </target>
708
709   <target name="run.test.debug" depends="init"
710           description="Build and run tests">
711     <ant antfile="${calendar.build.file}" inheritrefs="true"
712          target="run.test"  >
713       <property name="org.bedework.debug" value="yes" />
714     </ant>
715   </target>
716
717   <!-- Rebuild the http test suite only -->
718   <target name="httptest" depends="init"
719           description="Run httptest suite" >
720     <input message="httptest may destroy this calendar db. Proceed with test"
721            validargs="y,n"
722            addproperty="do.httptest" />
723     <condition property="do.abort">
724       <equals arg1="n" arg2="${do.httptest}"/>
725     </condition>
726     <fail if="do.abort">httptest aborted by user.</fail>
727
728     <ant antfile="${calendar.build.file}" inheritrefs="true"
729            target="bld.httptest" />
730
731     <ant antfile="${calendar.build.file}" inheritrefs="true"
732            target="run.httptest" />
733   </target>
734
735   <!-- =============================================================================
736        Update dependent project (target) from a project just built (this)
737        with a special library (i.e. not one in libapi
738        ============================================================================= -->
739   <macrodef name="copy-special-to-dependent">
740     <attribute name="target"/>
741     <attribute name="this"/>
742     <attribute name="fromdir" default="dist"/>
743     <attribute name="prefix" />
744     <sequential>
745       <delete>
746         <fileset dir="@{target}/lib" includes="@{prefix}*.jar"/>
747       </delete>
748
749       <copy todir="@{target}/lib" overwrite="yes">
750         <fileset dir="@{this}/@{fromdir}">
751           <include name="@{prefix}*.jar" />
752         </fileset>
753       </copy>
754     </sequential>
755   </macrodef>
756
757   <!-- =============================================================================
758        Update dependent project (target) from a project just built (this).
759        ============================================================================= -->
760   <macrodef name="copy-to-dependent">
761     <attribute name="target"/>
762     <attribute name="this"/>
763     <attribute name="fromdir" default="libapi"/>
764     <sequential>
765       <copy todir="@{target}/lib" overwrite="yes">
766         <fileset dir="@{this}/@{fromdir}">
767           <include name="*.jar" />
768         </fileset>
769       </copy>
770     </sequential>
771   </macrodef>
772
773   <!-- =============================================================================
774        Copy from a project just built (this) into bedework bin directory.
775        ============================================================================= -->
776   <macrodef name="copy-to-bin">
777     <attribute name="this"/>
778     <sequential>
779       <copy todir="${org.bedework.project.bedework}/bin" overwrite="yes">
780         <fileset dir="@{this}/dist">
781           <include name="*.jar" />
782         </fileset>
783       </copy>
784     </sequential>
785   </macrodef>
786 </project>
Note: See TracBrowser for help on using the browser.