root/trunk/calendar3/build.xml

Revision 751 (checked in by douglm, 7 years ago)

Moved useful translater class into client
Removed old caldav test class
Fixed up Domino caldav interface build

Line 
1 <?xml version="1.0"?>
2
3 <!-- This is the main build file for bedework which can be used in
4      conjunction with Ant (http://jakarta.apache.org/ant/) to
5      build, deploy, and distribute the bedework calendar project. Type
6      "ant -projecthelp" to see a list of ant targets.
7
8      The assumption is that deployers of the calendar will want to create
9      a number of independent calendar applications managed by different
10      groups.
11
12      To facilitate this the build process is driven by a set of properties
13      in config/configs.
14
15      You shouldn't need to modify base files or applications. Instead,
16      modify the application specific properties and html/jsp pages to create
17      a customized application.
18
19      Authors: Mike Douglass   douglm@rpi.edu
20 -->
21
22 <project name="bedework" default="bld.all">
23   <!-- ==================== Basic property Definitions =================
24       Each of the following properties are used in the build script.
25       Values for these properties are set by the first place they are
26       defined, from the following list:
27       * Definitions on the "ant" command line (ant -Ddeploy.home=xyz compile)
28       * Definitions from a "bedework.build.properties" file in the developer's
29         home directory
30       * Default definitions in this build.xml file
31
32       You will note below that property values can be composed based on the
33       contents of previously defined properties.  This is a powerful
34       technique that helps you minimize the number of changes required when
35       your development environment is modified.
36        ================================================================= -->
37
38   <!-- This may already be set from calling dir -->
39   <dirname property="org.bedework.calendar.dir" file="${ant.file}"/>
40
41   <property name="org.bedework.globaldefs.file"
42             location="${org.bedework.calendar.dir}/bldfiles/globalDefs.xml"/>
43   <import file="${org.bedework.globaldefs.file}"/>
44
45   <!-- =================================================================
46        init:  all the property defs are in bldfiles/globalDdefs.xml
47        ================================================================= -->
48
49   <target name="init" depends="globalDefs">
50     <!-- ==================== config properties ========================= -->
51     <property name="org.bedework.clone.name" value="${org.bedework.clone.default}" />
52     <property name="org.bedework.config.properties"
53               location="${org.bedework.config.base}/configs/${org.bedework.clone.name}.properties" />
54     <property name="org.bedework.config.options"
55               location="${org.bedework.config.base}/configs/${org.bedework.clone.name}.options.xml" />
56
57     <echo message="==========================================================" />
58     <echo message="Use config properties ${org.bedework.config.properties}" />
59     <loadproperties
60           srcFile="${org.bedework.config.properties}" >
61       <filterchain>
62         <expandproperties/>
63       </filterchain>
64     </loadproperties>
65   </target>
66
67   <!-- =================================================================
68        The "all" target does a complete clean rebuild of all applications.
69        ================================================================= -->
70
71   <target name="all" depends="init,clean,dist"
72           description="Clean build and dist"/>
73
74   <!-- ======================== Clean Target ===========================
75        The "clean" target deletes any generated directories, to ensure
76        applications are built from scratch.
77        ================================================================= -->
78
79   <target name="clean" depends="init"
80           description="Delete generated directories">
81     <delete dir="${org.bedework.temp.home}"/>
82     <delete dir="${dist.home}"/>
83     <delete>
84       <fileset dir="." includes="junit*.properties" />
85       <fileset dir="." includes="test.log*" />
86     </delete>
87   </target>
88
89 <!-- ===================== bld.all Target ===============================
90   This target builds jar files ready for the deploy target.
91      =================================================================== -->
92
93   <target name="bld.all"
94           depends="bld.locale,bld.common,bld.access,bld.davdefs,bld.calfacade,
95                    bld.calenv,bld.ical,bld.core,
96                    bld.http,
97                    bld.calsvci,bld.mail,bld.logging,
98                    bld.calsvc,bld.appcommon,bld.uportal,
99                    bld.webadmin,bld.webclient,bld.synchml,
100                    bld.caldav,bld.caldavclientapi,
101                    bld.caldavGoogle,bld.caldavDomino,bld.caldavTest,
102                    bld.timers,build.tools,
103                    bld.dumprestore,
104                    bld.test,bld.config"
105           description="Build war and ear files">
106     <antcall inheritrefs="true" target="copy.to.jars.repository" />
107   </target>
108
109   <target name="copy.to.jars.repository" if="org.bedework.jars.repository">
110     <mkdir dir="${org.bedework.jars.repository}" />
111
112     <copy todir="${org.bedework.jars.repository}" >
113       <fileset dir="${org.bedework.temp.jars}">
114         <include name="*-${product.version}.jar"/>
115       </fileset>
116     </copy>
117   </target>
118
119 <!-- ===================== Deploy Target ===============================
120      The "deploy" target builds configured war files and zipped runnable
121      application based on the configuration properties. It then copies the
122      contents of the build directory into the locations required by our
123      servlet container, and picks up any external dependencies along the way.
124
125      After restarting the servlet container, you can then test bedework.
126
127      To build a version for your site you should probably copy and modify the
128                   config/configs/democal.properties
129      file and change the value of org.bedework.clone.name to the name of your
130      new clone.
131
132      To build more than  one appsuite duplicate the ant task
133      invocation below with a different clone name in each.
134      =================================================================== -->
135
136   <target name="deploy.debug" depends="bld.all,deploy.log4j.xml"
137           description="Deploy applications to servlet container" >
138     <ant antfile="${org.bedework.deployment.base}/build.xml" inheritrefs="true"
139            target="deploy"  >
140       <property name="app.debug.val" value="9" />
141     </ant>
142   </target>
143
144   <target name="deploy" depends="bld.all,deploy.log4j.xml"
145           description="Deploy applications to servlet container" >
146     <ant antfile="${org.bedework.deployment.base}/build.xml" inheritrefs="true"
147            target="deploy"  >
148       <property name="org.bedework.clone.name" value="${org.bedework.clone.default}" />
149     </ant>
150   </target>
151
152   <!-- nobuild targets for quickstart so bld isn't executed twice -->
153   <target name="deploy.debug.nobuild" depends="init,deploy.log4j.xml"
154           description="Deploy applications to servlet container" >
155     <ant antfile="${org.bedework.deployment.base}/build.xml" inheritrefs="true"
156            target="deploy"  >
157       <property name="app.debug.val" value="9" />
158     </ant>
159   </target>
160
161   <target name="deploy.nobuild" depends="init,deploy.log4j.xml"
162           description="Deploy applications to servlet container" >
163     <ant antfile="${org.bedework.deployment.base}/build.xml" inheritrefs="true"
164            target="deploy"  >
165       <property name="org.bedework.clone.name" value="${org.bedework.clone.default}" />
166     </ant>
167   </target>
168
169 <!-- ================== build.configured Target ========================
170      Build configured war files but don't deploy. Use to build versions to
171      be deployed elsewhere.
172      =================================================================== -->
173
174   <target name="build.configured.debug" depends="bld.all"
175           description="Build configured applications" >
176     <ant antfile="${org.bedework.deployment.base}/build.xml" inheritrefs="true"
177            target="build.configured" >
178       <property name="app.debug.val" value="9" />
179     </ant>
180   </target>
181
182   <target name="build.configured" depends="bld.all"
183           description="Build configured applications" >
184     <ant antfile="${org.bedework.deployment.base}/build.xml" inheritrefs="true"
185            target="build.configured" >
186       <property name="org.bedework.clone.name" value="${org.bedework.clone.default}" />
187     </ant>
188   </target>
189
190   <!-- Copy log4j.xml to the app server but overwrite only if specified.
191        Somewhat annoying to find a carefully crafted log4j.xml gets overwritten.
192     -->
193   <target name="deploy.log4j.xml" >
194     <copy todir="${log4j.config.destination}"
195           file="${org.bedework.calendar.dir}/resources/log4j.xml"
196           overwrite="${org.bedework.deploy.log4j.config}" />
197   </target>
198
199   <!-- Target used to build from property files built by config tool -->
200   <target name="deploy.config" >
201     <copy todir="${log4j.config.destination}"
202           file="${org.bedework.calendar.dir}/resources/log4j.xml"
203           overwrite="${org.bedework.deploy.log4j.config}" />
204
205     <!-- The property org.bedework.deploy.config.name must be set -->
206     <ant antfile="${org.bedework.appsuite.base}/build.xml" inheritrefs="true"
207            target="deploy.config"  />
208
209     <antcall inheritrefs="true" target="deploy.caldav" />
210   </target>
211
212 <!-- ==================== Dist Target ==================================
213      The "dist" target creates a binary distribution of your application
214      in a directory structure ready to be archived in a tar.gz or zip file.
215      Note that this target depends on two others:
216      * "deploy" so that the entire web application (including external
217        dependencies) will have been assembled
218      * "javadoc" so that the application Javadocs will have been created
219      =================================================================== -->
220
221   <target name="dist" depends="bld.all,javadoc"
222           description="Create binary distribution" />
223
224 <!-- ==================== Javadoc Target ===============================
225      The "javadoc" target creates Javadoc API documentation for the Java
226      classes included in your application.  Normally, this is only required
227      when preparing a distribution release, but is available as a separate
228      target in case the developer wants to create Javadocs independently.
229      =================================================================== -->
230
231   <target name="javadoc" depends="init"
232           description="Create Javadoc API documentation">
233
234     <path id="javadoc.classpath">
235       <pathelement location="${servlet.jar}"/>
236       <pathelement location="${struts.jar}"/>
237       <pathelement location="${fop.jar}"/>
238       <pathelement location="${avalon.jar}"/>
239       <pathelement location="${log4j.jar}"/>
240       <pathelement location="${hibernate.jar}"/>
241       <pathelement location="${ical4j.jar}"/>
242       <pathelement location="${logkit.jar}"/>
243       <pathelement location="${jtidy.jar}"/>
244     </path>
245     <mkdir dir="${dist.home}/docs/api"/>
246     <javadoc sourcepath="${org.bedework.access.base}/src:
247                          ${org.bedework.appcommon.base}/src:
248                          ${org.bedework.core.base}/src:
249                          ${org.bedework.caldav.base}/src:
250                          ${org.bedework.caldavClientApi.base}/src:
251                          ${org.bedework.calenv.base}/src:
252                          ${org.bedework.calfacade.base}/src:
253                          ${org.bedework.calsvc.base}/src:
254                          ${org.bedework.calsvci.base}/src:
255                          ${org.bedework.common.base}/src:
256                          ${org.bedework.config.base}/src:
257                          ${org.bedework.davdefs.base}/src:
258                          ${org.bedework.dumprestore.base}/src:
259                          ${org.bedework.http.base}/src:
260                          ${org.bedework.ical.base}/src:
261                          ${org.bedework.locale.base}/src:
262                          ${org.bedework.logging.base}/src:
263                          ${org.bedework.mail.base}/src:
264                          ${org.bedework.synchml.base}/src:
265                          ${org.bedework.timers.base}/src:
266                          ${org.bedework.tools.base}/src:
267                          ${org.bedework.uportal.base}/src:
268                          ${org.bedework.webadmin.base}/src:
269                          ${org.bedework.webclient.base}/src:
270                          ${org.bedework.webcommon.base}/src:"
271            classpathref="javadoc.classpath"
272                 destdir="${dist.home}/docs/api"
273            packagenames="org.bedework.access.*,
274                          org.bedework.*,
275                          edu.rpi.cct.uwcal.access.*,
276                          edu.rpi.*"
277                  access="public"
278                  author="true"
279                 version="true"
280           breakiterator="yes"
281             windowtitle="${product.name} ${product.version} API Documentation">
282       <doctitle><![CDATA[${product.name} ${product.version}<br/>API Documentation]]></doctitle>
283       <header><![CDATA[${product.name} ${product.version}<br/>API Documentation]]></header>
284     </javadoc>
285
286   </target>
287
288   <!-- ======================== appcommon target =======================
289        This builds a jar file which provides application support.
290        ================================================================= -->
291
292   <target name="bld.appcommon"
293           depends="init,bld.access,bld.calsvci,bld.davdefs"
294           description="Build calendar service interface classes jar">
295       <ant antfile="${org.bedework.appcommon.base}/build.xml" inheritrefs="true"
296            target="build" />
297   </target>
298
299   <!-- ======================== calfacade target =========================
300        This builds the back end facade for the core of the calendar.
301        ================================================================= -->
302
303   <target name="bld.calfacade"
304           depends="bld.access"
305           description="Build calendar calfacade jars" >
306       <ant antfile="${org.bedework.calfacade.base}/build.xml" inheritrefs="true"
307            target="build" />
308   </target>
309
310   <!-- ======================== calenv target =========================
311        This builds the some environment dependent classes for the core
312        of the calendar.
313        ================================================================= -->
314
315   <target name="bld.calenv"
316           depends="bld.calfacade"
317           description="Build calendar env jars" >
318       <ant antfile="${org.bedework.calenv.base}/build.xml" inheritrefs="true"
319            target="build" />
320   </target>
321
322   <!-- ======================== core target =========================
323        This builds the back end core of the calendar. Applications interact
324        with that core through the CalFacade interface.
325        ================================================================= -->
326
327   <target name="bld.core"
328           depends="bld.calfacade,bld.calenv,bld.ical"
329           description="Build calendar core jars" >
330       <ant antfile="${org.bedework.core.base}/build.xml" inheritrefs="true"
331            target="build" />
332   </target>
333
334   <!-- ======================== locale target =========================
335        This builds the localization suite of the calendar.
336        ================================================================= -->
337
338   <target name="bld.locale"
339           depends="init"
340           description="Build calendar localization suite jars" >
341       <ant antfile="${org.bedework.locale.base}/build.xml" inheritrefs="true"
342            target="build" />
343   </target>
344
345   <!-- ======================== access target =========================
346        This builds the access control suite of the calendar.
347        ================================================================= -->
348
349   <target name="bld.access"
350           depends="bld.locale"
351           description="Build calendar access control suite jars" >
352       <ant antfile="${org.bedework.access.base}/build.xml" inheritrefs="true"
353            target="build" />
354   </target>
355
356   <!-- ======================== common target =======================
357        This builds the common classes jar.
358        ================================================================= -->
359
360   <target name="bld.common"
361           depends="init,bld.locale"
362           description="Build calendar common classes jar">
363       <ant antfile="${org.bedework.common.base}/build.xml" inheritrefs="true"
364            target="build" />
365   </target>
366
367   <!-- ======================== davdefs target =========================
368        This builds some global webdav and caldav definitions
369        ================================================================= -->
370
371   <target name="bld.davdefs"
372           depends="bld.common"
373           description="Build calendar davdefs jars" >
374       <ant antfile="${org.bedework.davdefs.base}/build.xml" inheritrefs="true"
375            target="build" />
376   </target>
377
378   <!-- ======================== http target =======================
379        This builds the http-client classes jar.
380        ================================================================= -->
381
382   <target name="bld.http"
383           depends="init,bld.calenv,bld.calfacade,bld.locale"
384           description="Build calendar http classes jar">
385       <ant antfile="${org.bedework.http.base}/build.xml" inheritrefs="true"
386            target="build" />
387   </target>
388
389   <!-- ======================== caldav Targets ========================
390        ================================================================= -->
391
392   <target name="bld.caldavclientapi"
393           depends="init,bld.http,bld.davdefs,bld.calfacade"
394           description="Build calendar caldav client api classes jar">
395       <ant antfile="${org.bedework.caldavClientApi.base}/build.xml" inheritrefs="true"
396            target="build" />
397   </target>
398
399   <target name="bld.caldav"
400           depends="init,bld.davdefs,bld.appcommon"
401           description="Build calendar caldav suite">
402     <ant antfile="${org.bedework.caldav.base}/build.xml" inheritrefs="true"
403            target="build" />
404   </target>
405
406   <target name="bld.caldavDomino"
407           depends="bld.caldav"
408           description="Build calendar caldav Domino interface"
409           if="org.bedework.build.caldav.domino">
410     <ant antfile="${org.bedework.caldavdomino.base}/build.xml" inheritrefs="true"
411            target="build" />
412   </target>
413
414   <target name="bld.caldavGoogle"
415           depends="bld.caldav"
416           description="Build calendar caldav Google interface"
417           if="org.bedework.build.caldav.google">
418     <ant antfile="${org.bedework.caldavgoogle.base}/build.xml" inheritrefs="true"
419            target="build" />
420   </target>
421
422   <target name="bld.caldavTest"
423           depends="bld.caldav"
424           description="Build caldav test suite" >
425     <ant antfile="${org.bedework.caldavtest.base}/build.xml" inheritrefs="true"
426            target="build" />
427   </target>
428
429   <!-- ======================== logging target =======================
430        This builds the logging classes jar.
431        ================================================================= -->
432
433   <target name="bld.logging"
434           depends="init,bld.calfacade"
435           description="Build logging classes jar">
436       <ant antfile="${org.bedework.logging.base}/build.xml" inheritrefs="true"
437            target="build" />
438   </target>
439
440   <!-- ======================== mail target =======================
441        This builds the mail classes jar.
442        ================================================================= -->
443
444   <target name="bld.mail"
445           depends="init,bld.calsvci"
446           description="Build calendar mail classes jar">
447       <ant antfile="${org.bedework.mail.base}/build.xml" inheritrefs="true"
448            target="build" />
449   </target>
450
451   <!-- ======================== calsvci target =======================
452        This builds the service level interface classes
453        ================================================================= -->
454
455   <target name="bld.calsvci"
456           depends="init,bld.common,bld.ical"
457           description="Build calendar service interface classes jar">
458       <ant antfile="${org.bedework.calsvci.base}/build.xml" inheritrefs="true"
459            target="build" />
460   </target>
461
462   <!-- ======================== calsvc target =======================
463        This builds the service level interface implementation classes
464        ================================================================= -->
465
466   <target name="bld.calsvc"
467           depends="init,bld.common,bld.mail"
468           description="Build calendar service interface implementation classes jar">
469       <ant antfile="${org.bedework.calsvc.base}/build.xml" inheritrefs="true"
470            target="build" />
471   </target>
472
473   <!-- ======================== ical target =======================
474        This builds the classes associated with ical (rfc2445 etc)
475        ================================================================= -->
476
477   <target name="bld.ical"
478           depends="init,bld.common,bld.locale"
479           description="Build icalendar classes jar">
480       <ant antfile="${org.bedework.ical.base}/build.xml" inheritrefs="true"
481            target="build" />
482   </target>
483
484   <!-- ======================== uportal target =======================
485        This builds the uportal support classes jar.
486        ================================================================= -->
487
488   <target name="bld.uportal"
489           depends="init,bld.locale"
490           description="Build calendar uportal support classes jar">
491       <ant antfile="${org.bedework.uportal.base}/build.xml" inheritrefs="true"
492            target="build" />
493   </target>
494
495   <!-- ======================== webcommon target =======================
496        This builds the web common classes jar.
497        ================================================================= -->
498
499   <target name="bld.webcommon"
500           depends="bld.appcommon"
501           description="Build calendar web common classes jar">
502       <ant antfile="${org.bedework.webcommon.base}/build.xml" inheritrefs="true"
503            target="build" />
504   </target>
505
506   <!-- ======================= web client Targets ======================
507        This builds the web applications jars.
508        ================================================================= -->
509
510   <target name="bld.webadmin"
511           depends="init,bld.webcommon"
512           description="Build calendar webadmin suite">
513     <ant antfile="${org.bedework.webadmin.base}/build.xml" inheritrefs="true"
514            target="build" />
515   </target>
516
517   <target name="bld.webclient"
518           depends="init,bld.webcommon"
519           description="Build calendar webclient suite">
520     <ant antfile="${org.bedework.webclient.base}/build.xml" inheritrefs="true"
521            target="build" />
522   </target>
523
524   <!-- ======================== synchml Targets ========================
525        *
526        *  NOTE: Incomplete and under development
527        * The following comments map out an approach rather than document the
528        * facts
529        This builds the synchml library and applications.
530        Many build properties are taken from the appsuite clones property files.
531        To build a version for your site you should probably copy and modify the
532                   appsuite/clones/democal.properties
533        file and change the value of org.bedework.clone.name to the name of your
534        new clone.
535
536        To build more than  one appsuite duplicate the ant task
537        invocation below with a different clone name in each.
538        ================================================================= -->
539
540   <target name="bld.synchml"
541           depends="init,bld.appcommon,bld.calsvci,bld.ical,bld.calsvc,bld.webcommon"
542           description="Build calendar synchml suite">
543     <ant antfile="${org.bedework.synchml.base}/build.xml" inheritrefs="true"
544            target="build"  >
545       <property name="org.bedework.clone.name" value="${org.bedework.clone.default}" />
546     </ant>
547   </target>
548
549   <target name="bld.synchml.debug"
550           depends="init,bld.appcommon,bld.calsvci,bld.ical,bld.calsvc,bld.webcommon"
551           description="Build calendar synchml suite">
552     <ant antfile="${org.bedework.synchml.base}/build.xml" inheritrefs="true"
553            target="build" >
554       <property name="org.bedework.clone.name" value="${org.bedework.clone.default}" />
555       <property name="app.debug.val" value="9" />
556     </ant>
557   </target>
558
559   <!-- ======================== config Target ========================
560        This builds the config and deploy application
561        ================================================================= -->
562
563   <target name="bld.config"
564           depends="init"
565           description="Build calendar config and deploy module">
566     <ant antfile="${org.bedework.config.base}/build.xml" inheritrefs="true"
567            target="build" />
568   </target>
569
570   <!-- ======================== timers Targets ========================
571        This builds some timing service classes and applications
572        ================================================================= -->
573
574   <target name="bld.timers"
575           depends="init,bld.appcommon"
576           description="Build calendar timed services suite">
577     <ant antfile="${org.bedework.timers.base}/build.xml" inheritrefs="true"
578            target="build" >
579       <property name="org.bedework.clone.name" value="${org.bedework.clone.default}" />
580     </ant>
581   </target>
582
583   <target name="bld.timers.debug"
584           depends="init,bld.appcommon"
585           description="Build calendar timed services suite">
586     <ant antfile="${org.bedework.timers.base}/build.xml" inheritrefs="true"
587            target="build" >
588       <property name="app.debug.val" value="9" />
589       <property name="org.bedework.clone.name" value="${org.bedework.clone.default}" />
590     </ant>
591   </target>
592
593   <target name="bld.dumprestore"
594           depends="init,bld.appcommon"
595           description="Build calendar dumprestore suite">
596     <ant antfile="${org.bedework.dumprestore.base}/build.xml" inheritrefs="true"
597          target="build" />
598   </target>
599
600   <!-- ======================== tools Targets ========================
601        This builds the tools
602
603        To build more than  one appsuite duplicate the ant task
604        invocation below with a different clone name in each.
605        ================================================================= -->
606
607   <target name="build.tools"
608           depends="init,bld.appcommon"
609           description="Build calendar tools suite">
610     <ant antfile="${org.bedework.tools.base}/build.xml" inheritrefs="true"
611            target="build" />
612   </target>
613
614   <target name="dumpdb" depends="init">
615     <ant antfile="${org.bedework.dumprestore.base}/build.xml" inheritrefs="true"
616            target="dumpdb" />
617   </target>
618
619   <target name="restoredb" depends="init">
620     <ant antfile="${org.bedework.dumprestore.base}/build.xml" inheritrefs="true"
621            target="restoredb" />
622   </target>
623
624   <target name="restoredb-nousers" depends="init">
625     <ant antfile="${org.bedework.dumprestore.base}/build.xml" inheritrefs="true"
626            target="restoredb-nousers" />
627   </target>
628
629   <target name="initdb" depends="init">
630     <ant antfile="${org.bedework.dumprestore.base}/build.xml" inheritrefs="true"
631            target="initdb" />
632   </target>
633
634   <target name="tzconvert" depends="init">
635     <ant antfile="${org.bedework.tools.base}/build.xml" inheritrefs="true"
636            target="tzconvert" />
637   </target>
638
639   <!-- ======================== test target =======================
640        This builds the test suite
641        ================================================================= -->
642
643   <target name="webtest.all" depends="init"
644           description="Run the full webtest suite">
645       <ant antfile="${org.bedework.webtest.base}/build.xml" inheritrefs="true"
646            target="all" />
647   </target>
648
649   <target name="bld.test"
650           depends="init,bld.core,bld.appcommon,bld.synchml"
651           description="Build all calendar test jars">
652       <ant antfile="${org.bedework.testsuite.base}/build.xml" inheritrefs="true"
653            target="build" />
654   </target>
655
656   <target name="run.test"
657           depends="init,bld.core,bld.access,bld.appcommon,bld.synchml"
658           description="Run JUnit tests and generate a report">
659       <ant antfile="${org.bedework.testsuite.base}/build.xml" inheritrefs="true"
660            target="run.unittest" />
661   </target>
662
663   <target name="bld.httptest"
664           depends="init"
665           description="Build calendar http test suite classes jar">
666       <ant antfile="${org.bedework.testsuite.base}/build.xml" inheritrefs="true"
667            target="build.httptest" />
668   </target>
669
670   <target name="run.httptest"
671           depends="init"
672           description="Run calendar http test suite classes jar">
673     <!-- Define location of run-time env.properties -->
674     <property name="uwcal.env.properties.root"
675               location="${uwcal.test.env.properties.root}" />
676
677       <ant antfile="${org.bedework.testsuite.base}/build.xml" inheritrefs="true"
678            target="run.httptest" />
679   </target>
680
681   <target name="synchmltest"
682           depends="bld.test"
683           description="Run calendar synchml test">
684     <!-- Define location of run-time env.properties -->
685     <property name="uwcal.env.properties.root"
686               location="${uwcal.test.env.properties.root}" />
687
688     <ant antfile="${org.bedework.testsuite.base}/build.xml" inheritrefs="true"
689          target="synchmltest" />
690   </target>
691
692   <!-- ======================== schema target =======================
693        This builds the ddl from the hibernate schema
694        ================================================================= -->
695
696   <target name="schema" depends="init"
697           description="Generate schema from mapping files">
698     <echo message="Creating a schema is also available from the generated stand-alone" />
699     <echo message="scripts using the 'schema' or 'schema-export' parameter" />
700
701     <input message="text only? no will update db with new schema "
702            validargs="yes,no"
703            addproperty="schema.text.only" />
704
705     <property name="schema.run.base"
706               location="${org.bedework.temp.home}/schema"/>
707     <property name="schema.run.resources"
708               location="${schema.run.base}/resources"/>
709
710     <delete dir="${schema.run.resources}" />
711     <mkdir dir="${schema.run.resources}" />
712     <copy tofile="${schema.run.resources}/log4j.xml"
713           file="${org.bedework.testsuite.base}/resources/log4j.xml" />
714     <property name="org.bedework.schema.hibernate.properties"
715               location="${org.bedework.testsuite.base}/resources/hibernate.properties" />
716     <copy tofile="${schema.run.resources}/hibernate.properties"
717           file="${org.bedework.schema.hibernate.properties}" />
718
719           <!--
720     <property name="org.bedework.hibernate.schema.properties"
721               location="${schema.run.resources}/hibernate.properties" />
722               -->
723
724     <mkdir dir="${schema.run.resources}/hbms" />
725     <copy todir="${schema.run.resources}/hbms" >
726       <fileset dir="${org.bedework.core.base}/resources/hbms">
727         <include name="*.hbm.xml"/>
728       </fileset>
729     </copy>
730
731     <path id="schema.cp">
732       <!-- Include any local jdbc drivers -->
733       <fileset dir="${org.bedework.jdbc.lib}">
734          <include name="**/*.jar"/>
735       </fileset>
736
737       <!-- Include the quickstart jdbc driver -->
738       <pathelement location="${hsqldb.jdbcdriver.jar}"/>
739
740       <!-- Need the hibernate stuff -->
741       <fileset dir="${hibernate.jars.dir}">
742          <include name="**/*.jar"/>
743       </fileset>
744       <pathelement location="${log4j.jar}"/>
745
746       <!-- for commons stuff -->
747       <fileset dir="${struts.dir}">
748          <include name="commons*.jar"/>
749       </fileset>
750
751       <!-- Need the classes we are trying to persist -->
752       <pathelement location="${org.bedework.access.jar}"/>
753       <pathelement location="${org.bedework.calfacadeshared.jar}"/>
754
755       <!-- The xml schema files -->
756       <pathelement location="${org.bedework.core.base}/resources"/>
757       <pathelement location="${schema.run.resources}"/>
758       <pathelement location="${schema.run.resources}/hbms"/>
759       <pathelement location="${schema.run.resources}/hibernate.properties"/>
760     </path>
761
762     <copy todir="${schema.run.resources}/hbms"
763           file="${org.bedework.core.base}/resources/properties/hibernate.cfg.xml" />
764
765     <property name="cp" refid="schema.cp" />
766     <echo message="***************cp: ${cp}"/>
767
768     <taskdef name="schemaexport"
769              classname="org.hibernate.tool.hbm2ddl.SchemaExportTask">
770       <classpath refid="schema.cp"/>
771     </taskdef>
772
773     <!-- text="no" causes task to create db. Requires db system to be running
774          and jdbc drivers on class path
775          -->
776     <schemaexport properties="${schema.run.resources}/hibernate.properties"
777                   quiet="no"
778                   text="${schema.text.only}"
779                   drop="no"
780                   delimiter=";"
781                   output="schema-export.sql"
782                   config="${schema.run.resources}/hbms/hibernate.cfg.xml">
783     </schemaexport>
784   </target>
785
786 <!-- ===================== Quickstart target ===============================
787      The "quickstart.build" target 'builds' quickstart by copying particular
788      files into the quickstart directory.  We assume quickstart consists of
789      a directory containing 4 subdirectories:  tomcat, hsqldb, ant, and
790      this one (calendar3), along with the 3 ant executable files.  This
791      target copies files from calendar3 into the quickstart and tomcat
792      directories to create a calendar version that works out of the box
793      (once ant deploy is run).
794      =================================================================== -->
795
796   <target name="quickstart.build" depends="init"
797           description="copy files to quickstart directories">
798
799     <property name="quickstart.files.dir"
800               location="${org.bedework.calendar.dir}/quickstartFiles"/>
801
802     <copy todir="${org.bedework.appserver.dir}/conf" overwrite="yes">
803        <fileset dir="${quickstart.files.dir}/tomcat.conf" />
804     </copy>
805
806     <copy todir="${org.bedework.calendar.dir}/.." overwrite="yes">
807        <fileset dir="${quickstart.files.dir}/root" />
808     </copy>
809   </target>
810
811   <!-- Create a version using acegi security
812     -->
813   <target name="quickstart.acegi.build" depends="init"
814           description="copy files to quickstart directories">
815
816     <property name="quickstart.files.dir"
817               location="${org.bedework.calendar.dir}/quickstartFiles"/>
818
819     <copy todir="${org.bedework.appserver.dir}/common/lib" overwrite="yes">
820        <fileset dir="${org.bedework.calendar.dir}/lib/acegi"
821                 excludes="acegi-security-catalina-server.jar" />
822     </copy>
823
824     <copy todir="${org.bedework.appserver.dir}/server/lib" overwrite="yes">
825        <fileset dir="${org.bedework.calendar.dir}/lib/acegi"
826                 includes="acegi-security-catalina-server.jar" />
827     </copy>
828
829     <copy tofile="${org.bedework.appserver.dir}/conf/server.xml" overwrite="yes"
830           file="${quickstart.files.dir}/tomcat.conf/server.acgi.xml" />
831
832     <copy tofile="${org.bedework.appserver.dir}/conf/acegisecurity.xml" overwrite="yes"
833           file="${quickstart.files.dir}/tomcat.conf/acegisecurity.xml" />
834
835     <copy todir="${org.bedework.calendar.dir}/.." overwrite="yes">
836        <fileset dir="${quickstart.files.dir}/root" />
837     </copy>
838   </target>
839 </project>
Note: See TracBrowser for help on using the browser.