root/trunk/calendar3/build.xml

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

Add schema and scheam-export to the runnable dump/restore shell script

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