root/trunk/calendar3/build.xml

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

Set of changes to move privileges xml rendering out of caldav and into a common place.

Moved some classes to enable that, new package davdefs to make tags and othre definitions commonly available.

Fixed up the caldav test package and added some tests

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