root/trunk/build/quickstart/linux/bw

Revision 3537 (checked in by douglm, 1 year ago)

Two intertwined updates here.

Most projects are changed to go some way towards maven. Use maven-ant tasks to deal with build dependencies. Mostly chnages to build.xml and the additon of pom.xml.

Additionally, added a new bedenote project which handles JMS messages. This removes the need for special support from activemq.

Removed the auto-deploy of activemq config and made it a special target - "deployActivemq"

To install this stuff:

1. Check out the bedenote project
2. execute the deployActivemq target
3. Build/deploy bedenote
4. Restart


  • Property svn:mergeinfo set to
  • Property svn:executable set to *
Line 
1 #! /bin/sh
2
3 #
4 # This file is included by the quickstart script file "bw" so that it can live
5 # within the svn repository.
6 #
7
8 ANT_HOME=`dirname "$PRG"`/apache-ant-1.7.0
9 ANT_HOME=`cd "$ANT_HOME" && pwd`
10
11 #ant_listener="-listener org.apache.tools.ant.listener.Log4jListener"
12 #ant_xmllogfile="-DXmlLogger.file=log.xml"
13 #ant_logger="-logger org.apache.tools.ant.XmlLogger"
14
15 ant_listener=
16 ant_xmllogfile=
17 ant_logger=
18
19 ant_loglevel="-quiet"
20 bw_loglevel=""
21
22 # Projects we need to update - these are the svn projects - not internal variables
23 # or user parameters.
24 updateProjects="access"
25 updateProjects="$updateProjects  bedework"
26 updateProjects="$updateProjects  bedework-carddav"
27 updateProjects="$updateProjects  bwannotations"
28 updateProjects="$updateProjects  bwcalcore"
29 updateProjects="$updateProjects  bwcaldav"
30 updateProjects="$updateProjects  bwcalFacade"
31 updateProjects="$updateProjects  bwdeployutil"
32 updateProjects="$updateProjects  bwical"
33 updateProjects="$updateProjects  bwinterfaces"
34 updateProjects="$updateProjects  bwmisc"
35 updateProjects="$updateProjects  bwsysevents"
36 updateProjects="$updateProjects  bwtzsvr"
37 updateProjects="$updateProjects  bwwebapps"
38 updateProjects="$updateProjects  bwxml"
39 updateProjects="$updateProjects  cachedfeeder"
40 updateProjects="$updateProjects  caldav"
41 updateProjects="$updateProjects  davutil"
42 updateProjects="$updateProjects  dumprestore"
43 # updateProjects="$updateProjects  geronimo-hib"
44 updateProjects="$updateProjects  indexer"
45 updateProjects="$updateProjects  rpiutil"
46 updateProjects="$updateProjects  synch"
47 updateProjects="$updateProjects  webdav"
48
49 # Projects we will build - pkgdefault (bedework) is built if nothing specified
50 pkgdefault=yes
51 access=
52 bedenote=
53 bedework=
54 bwannotations=
55 bwcalcore=
56 bwcaldav=
57 bwcalfacade=
58 bwdeployutil=
59 bwicalendar=
60 bwinterfaces=
61 bwmisc=
62 bwsysevents=
63 bwtools=
64 bwwebapps=
65 bwxml=
66 caldav=
67 caldavTest=
68 carddav=
69 catsvr=
70 client=
71 davutil=
72 dumprestore=
73 exchgGateway=
74 geronimoHib=
75 indexer=
76 monitor=
77 naming=
78 rpiutil=
79 synch=
80 testsuite=
81 tzsvr=
82 webdav=
83
84 # Special targets - avoiding dependencies
85
86 deploylog4j=
87 deployActivemq=
88 dirstart=
89
90 specialTarget=
91
92 echo ""
93 echo "  Bedework Calendar System"
94 echo "  ------------------------"
95 echo ""
96
97 PRG="$0"
98
99 usage() {
100   echo "  $PRG ACTION"
101   echo "  $PRG [CONFIG-SOURCE] [CONFIG] [PROJECT] [ -offline ] [LOG_LEVEL] [ target ] "
102   echo ""
103   echo " where:"
104   echo ""
105   echo "   ACTION defines an action to take usually in the context of the quickstart."
106   echo "    In a deployed system many of these actions are handled directly by a"
107   echo "    deployed application. ACTION may be one of"
108   echo "      -updateall  Does an svn update of all projects"
109   echo "      -zoneinfo   builds zoneinfo data for the timezones server"
110   echo "                  requires -version and -tzdata parameters.   "
111   echo "                  NOTE: build depends on glib2 and only works on Linux/Unix"
112   echo "      -buildwebcache     builds webcache"
113   echo "      -deploywebcache    deploys webcache"
114   echo "      -deployurlbuilder  deploys url/widget builder"
115   echo ""
116   echo "   CONFIG-SOURCE optionally defines the location of configurations and"
117   echo "                 is one or none of  "
118   echo "     -quickstart    to use the configurations within the quickstart"
119   echo "     -bwchome path  to specify the location of the bwbuild directory"
120   echo "   The default is to look in the user home for the bwbuild directory."
121   echo ""
122   echo "   CONFIG optionally defines the configuration to build"
123   echo "      -bwc configname"
124   echo ""
125   echo "   -offline     Build without attempting to retrieve library jars"
126   echo ""
127   echo "   LOG_LEVEL sets the level of logging and can be"
128   echo "      -log-silent   Nearly silent"
129   echo "      -log-quiet    The default"
130   echo "      -log-inform   A little more noisy"
131   echo "      -log-verbose  Noisier"
132   echo "      -log-configs  Some info about configurations"
133   echo "      -ant-debug    Vast amounts of ant output"
134   echo "      -build-debug  Some bedework build debug output"
135   echo ""
136   echo "   target       Special target or Ant target to execute"
137   echo ""
138   echo "   Special targets"
139   echo "      deploylog4j       deploys a log4j configuration"
140   echo "      deployActivemq    deploys the Activemq config"
141   echo ""
142   echo "   PROJECT optionally defines the package to build. If omitted the main"
143   echo "           bedework calendar system will be built otherwise it is one of"
144   echo "           the core, ancillary or experimental targets below:"
145   echo ""
146   echo "   Core sub-projects: required for a functioning system"
147   echo "     -access       Target is for the access classes"
148   echo "     -bwann        Target is for the annotation classes"
149   echo "     -bwcalcore    Target is for the bedework core api implementation"
150   echo "     -bwcaldav     Target is for the bedework CalDAV implementation"
151   echo "     -bwcalfacade  Target is for the bedework api interface classes"
152   echo "     -bwicalendar  Target is for the bedework icalendar classes"
153   echo "     -bwinterfaces Target is for the bedework service and api interfaces"
154   echo "     -bwmisc       Target is for misc classes"
155   echo "     -bwsysevents  Target is for the system JMS event classes"
156   echo "     -bwwebapps    Target is for the bedework web ui classes"
157   echo "     -bwxml        Target is for the Bedework XML schemas build"
158   echo "                        (usually built automatically be dependent projects"
159   echo "     -caldav       Target is for the generic CalDAV server"
160   echo "     -carddav      Target is for the CardDAV build"
161   echo "     -carddav deploy-addrbook    To deploy the Javascript Addressbook client."
162   echo "     -davutil      Target is for the Bedework dav util classes"
163   echo "     -dumprestore  Target is for the Bedework dump/restore service"
164   echo "     -indexer      Target is for the Bedework indexer service"
165   echo "     -rpiutil      Target is for the Bedework util classes"
166   echo "     -synch        Target is for the synch build"
167   echo "     -tzsvr        Target is for the timezones server build"
168   echo "     -webdav       Target is for the WebDAV build"
169   echo "   Ancillary projects: not required"
170   echo "     -bwtools      Target is for the Bedework tools build"
171   echo "     -caldavTest   Target is for the CalDAV Test build"
172   echo "     -deployutil   Target is for the Bedework deployment classes"
173   echo "     -monitor      Target is for the bedework monitor application"
174   echo "     -testsuite    Target is for the bedework test suite"
175   echo "   Experimental projects: no guarantees"
176   echo "     -catsvr       Target is for the Catsvr build"
177   echo "     -client       Target is for the bedework client application build"
178   echo "     -naming       Target is for the abstract naming api"
179   echo ""
180   echo "   Invokes ant to build or deploy the Bedework system. Uses a configuration"
181   echo "   directory which contains one directory per configuration."
182   echo ""
183   echo "   Within each configuration directory we expect a file called build.properties"
184   echo "   which should point to the property and options file needed for the deploy process"
185   echo ""
186   echo "   In general these files will be in the same directory as build.properties."
187   echo "   The environment variable BEDEWORK_CONFIG contains the path to the current"
188   echo "   configuration directory and can be used to build a path to the other files."
189   echo ""
190 }
191
192 errorUsage() {
193   echo "*******************************************************************************************"
194   echo "Error: $1"
195   echo "*******************************************************************************************"
196   echo
197   echo "Sleeping 5 seconds before displaying usage. Safe to ctrl-C."
198   sleep 5
199   echo ""
200   usage
201   exit 1
202 }
203
204 # ----------------------------------------------------------------------------
205 # Update the projects
206 # ----------------------------------------------------------------------------
207 actionUpdateall() {
208   for project in $updateProjects
209   do
210     if [ ! -d "$project" ] ; then
211       echo "*********************************************************************"
212       echo "Project $project is missing. Check it out from the repository"
213       echo "*********************************************************************"
214       exit 1
215     else
216       echo "*********************************************************************"
217       echo "Updating project $project"
218       echo "*********************************************************************"
219       svn update $project
220     fi
221   done
222  
223   exit 0
224 }
225
226 usageZoneinfo() {
227   echo ""
228   echo "$PRG -zoneinfo -fetch"
229   echo "to have data fetched and processed. Alternatively to process a specifi set of data"
230   echo "$PRG -zoneinfo -version VERSION -tzdata path-to-data"
231   echo "for example:"
232   echo "$PRG -zoneinfo -version 2010m -tzdata /data/olson/tzdata2010m.tar.gz"
233   echo ""
234   echo "The data can be obtained manually in the following manner:"
235   echo "  wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'"
236   echo ""
237   echo "The version is the '*' part of the name"
238  
239   exit 1
240 }
241
242 # Change to the next project to build. Exit if we're done.
243 # The order below reflects the dependencies
244 setDirectory() {
245     specialTarget=
246    
247 #     Special targets
248         if [ "$dirstart" != "" ] ; then
249           cd $QUICKSTART_HOME
250           specialTarget=dirstart
251       dirstart=
252           return
253         fi
254
255         if [ "$deploylog4j" != "" ] ; then
256           cd $QUICKSTART_HOME
257           specialTarget=deploylog4j
258       deploylog4j=
259           return
260         fi
261
262         if [ "$deployActivemq" != "" ] ; then
263           cd $QUICKSTART_HOME
264           specialTarget=deployActivemq
265       deployActivemq=
266           return
267         fi
268        
269 #     projects
270
271         if [ "$geronimoHib" != "" ] ; then
272           cd $QUICKSTART_HOME/geronimo-hibernate
273       geronimoHib=
274           return
275         fi
276
277         if [ "$bedenote" != "" ] ; then
278           cd $QUICKSTART_HOME/bedenote
279       bedenote=
280           return
281         fi
282
283         if [ "$bwdeployutil" != "" ] ; then
284           cd $QUICKSTART_HOME/bwdeployutil
285       bwdeployutil=
286           return
287         fi
288
289         if [ "$bwxml" != "" ] ; then
290           cd $QUICKSTART_HOME/bwxml
291       bwxml=
292           return
293         fi
294        
295         if [ "$rpiutil" != "" ] ; then
296           cd $QUICKSTART_HOME/rpiutil
297       rpiutil=
298           return
299         fi
300        
301         if [ "$access" != "" ] ; then
302           cd $QUICKSTART_HOME/access
303       access=
304           return
305         fi
306        
307         if [ "$davutil" != "" ] ; then
308           cd $QUICKSTART_HOME/davutil
309       davutil=
310           return
311         fi
312        
313         if [ "$webdav" != "" ] ; then
314           cd $QUICKSTART_HOME/webdav
315       webdav=
316           return
317         fi
318        
319         if [ "$caldav" != "" ] ; then
320           cd $QUICKSTART_HOME/caldav
321       caldav=
322           return
323         fi
324        
325         if [ "$caldavTest" != "" ] ; then
326           cd $QUICKSTART_HOME/caldavTest
327       caldavTest=
328           return
329         fi
330        
331         if [ "$carddav" != "" ] ; then
332           cd $QUICKSTART_HOME/bedework-carddav
333       carddav=
334           return
335         fi
336
337         if [ "$bwannotations" != "" ] ; then
338           cd $QUICKSTART_HOME/bwannotations
339       bwannotations=
340           return
341         fi
342
343         if [ "$bwcalfacade" != "" ] ; then
344           cd $QUICKSTART_HOME/bwcalFacade
345       bwcalfacade=
346           return
347         fi
348
349         if [ "$bwinterfaces" != "" ] ; then
350           cd $QUICKSTART_HOME/bwinterfaces
351       bwinterfaces=
352           return
353         fi
354
355         if [ "$bwsysevents" != "" ] ; then
356           cd $QUICKSTART_HOME/bwsysevents
357       bwsysevents=
358           return
359         fi
360
361         if [ "$bwicalendar" != "" ] ; then
362           cd $QUICKSTART_HOME/bwical
363       bwicalendar=
364           return
365         fi
366
367         if [ "$bwmisc" != "" ] ; then
368           cd $QUICKSTART_HOME/bwmisc
369       bwmisc=
370           return
371         fi
372        
373         if [ "$bwwebapps" != "" ] ; then
374           cd $QUICKSTART_HOME/bwwebapps
375       bwwebapps=
376           return
377         fi
378
379         if [ "$bwcaldav" != "" ] ; then
380           cd $QUICKSTART_HOME/bwcaldav
381       bwcaldav=
382           return
383         fi
384
385         if [ "$bwcalcore" != "" ] ; then
386           cd $QUICKSTART_HOME/bwcalcore
387       bwcalcore=
388           return
389         fi
390        
391         if [ "$catsvr" != "" ] ; then
392           cd $QUICKSTART_HOME/catsvr
393       catsvr=
394           return
395         fi
396        
397         if [ "$client" != "" ] ; then
398           cd $QUICKSTART_HOME/bwclient
399       client=
400           return
401         fi
402        
403         if [ "$indexer" != "" ] ; then
404           cd $QUICKSTART_HOME/indexer
405       indexer=
406           return
407         fi
408        
409         if [ "$dumprestore" != "" ] ; then
410           cd $QUICKSTART_HOME/dumprestore
411       dumprestore=
412           return
413         fi
414        
415         if [ "$bedework" != "" ] ; then
416           cd $QUICKSTART_HOME
417       bedework=
418           return
419         fi
420        
421         if [ "$monitor" != "" ] ; then
422           cd $QUICKSTART_HOME/MonitorApp
423       monitor=
424           return
425         fi
426        
427         if [ "$naming" != "" ] ; then
428           cd $QUICKSTART_HOME/bwnaming
429       naming=
430           return
431         fi
432        
433         if [ "$exchgGateway" != "" ] ; then
434           cd $QUICKSTART_HOME/exchgGateway
435       exchgGateway=
436           return
437         fi
438
439         if [ "$synch" != "" ] ; then
440           cd $QUICKSTART_HOME/synch
441       synch=
442           return
443         fi
444        
445         if [ "$testsuite" != "" ] ; then
446           cd $QUICKSTART_HOME/testsuite
447       testsuite=
448           return
449         fi
450        
451         if [ "$tzsvr" != "" ] ; then
452           cd $QUICKSTART_HOME/bwtzsvr
453       tzsvr=
454           return
455         fi
456        
457         if [ "$bwtools" != "" ] ; then
458           cd $QUICKSTART_HOME/bwtools
459       bwtools=
460           return
461         fi
462
463 # Nothing left to do
464     echo "Finished at $(date)" 
465         exit 0;
466 }
467
468 # ----------------------------------------------------------------------------
469 # Build zoneinfo - require -version -tzdata
470 # tzdata file can be obtained via http://www.twinsun.com/tz/tz-link.htm or
471 # more directly from ftp://elsie.nci.nih.gov/pub/
472 # The version parameter value should be the version code from the tzdata name
473 # ----------------------------------------------------------------------------
474 actionZoneinfo() {
475   bwtzsvr="$QUICKSTART_HOME/bwtzsvr"
476   bwresources="$bwtzsvr/resources"
477
478   rm -rf /tmp/bedework
479   mkdir /tmp/bedework
480   mkdir /tmp/bedework/timezones
481   mkdir /tmp/bedework/timezones/data
482  
483   cd /tmp/bedework/timezones
484  
485   shift
486  
487   if [ "$1" = "-fetch" ] ; then
488     shift
489     cd data
490     wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'
491     gzip -dc tzdata*.tar.gz | tar -xf -
492    
493     filename=$(basename `ls tzdata*`)
494     version=$( echo $filename | cut -c 7-11 )
495    
496     tzdata="/tmp/bedework/timezones/data/$filename"
497    
498     cd ..
499    
500     echo version=$version
501     echo tzdata=$tzdata
502   else
503     if [ "$1" != "-version" ] ; then
504       echo "got $1"
505       echo "Must supply -version parameter for -zoneinfo"
506       usageZoneinfo
507     fi
508    
509     shift
510
511     echo "got $1"
512     version=$1
513
514     shift
515    
516     if [ "$1" != "-tzdata" ] ; then
517       echo "Must supply -tzdata parameter for -zoneinfo"
518       usageZoneinfo
519     fi
520    
521     shift
522
523     tzdata=$1
524
525     shift
526   fi
527  
528   wget http://bedework.org/downloads/lib/vzic-1.3.tgz
529   gunzip vzic-1.3.tgz
530   tar -xf vzic-1.3.tar
531
532 # copy and unpack the data
533   mkdir olsondata
534   cd olsondata
535   cp $tzdata tzdata.tar.gz
536   gunzip tzdata.tar.gz
537   tar -xf tzdata.tar
538   rm tzdata.tar
539   cd ..
540  
541 # Replace lines in the makefile. Sure real unix types can do better 
542  
543   cd vzic-1.3
544  
545   sed "s/\(^OLSON_DIR = \)\(..*$\)/\1\/tmp\/bedework\/timezones\/olsondata/" Makefile > Makefile1
546
547   sed "s/\(^PRODUCT_ID = \)\(..*$\)/\1\/bedework.org\/\/NONSGML Bedework\/\/EN/" Makefile1 > Makefile2
548
549   sed "s/\(^TZID_PREFIX = \)\(..*$\)/\1/" Makefile2 > Makefile
550  
551   make
552  
553 # omit the pure for allegedly better outlook compatability -
554 # but not altogether correct timezones 
555   ./vzic --pure
556
557   cd ..
558  
559   mkdir tzdata
560   cp -r vzic-1.3/zoneinfo tzdata
561   cp $bwresources/aliases.txt tzdata
562  
563   cd tzdata
564  
565   echo "version=$version" > info.txt
566 #  date +buildTime=%D-%T-%N >> info.txt
567   date --utc +buildTime=%Y%m%dT%H%M%SZ >> info.txt
568  
569   zip -r tzdata *
570  
571   cp tzdata.zip $bwtzsvr/dist
572  
573   echo ""
574   echo "------------------------------------------------------------------------------"
575   echo "tzdata.zip has been built and is at $bwtzsvr/dist/tzdata.zip"
576   echo "------------------------------------------------------------------------------"
577   echo ""
578  
579   exit 0
580 }
581
582 if [ -z "$JAVA_HOME" -o ! -d "$JAVA_HOME" ] ; then
583   errorUsage "JAVA_HOME is not defined correctly for bedework."
584 fi
585
586 saveddir=`pwd`
587
588 trap 'cd $saveddir' 0
589 trap "exit 2" 1 2 3 15
590
591 export QUICKSTART_HOME=$saveddir
592
593 CLASSPATH=$ANT_HOME/lib/ant-launcher.jar
594 CLASSPATH=$CLASSPATH:$QUICKSTART_HOME/bedework/build/quickstart/antlib
595
596 # Default some parameters
597
598 BWCONFIGS=
599 bwc=default
600 BWCONFIG=
601 offline=
602 quickstart=
603
604 action=
605
606 if [ "$1" = "" ] ; then
607   usage
608   exit 1
609 fi
610
611 # look for actions first
612
613 if [ "$1" = "-updateall" ] ; then
614   actionUpdateall
615 fi
616
617 if [ "$1" = "-zoneinfo" ] ; then
618   actionZoneinfo $*
619 fi
620
621 if [ "$1" = "-buildwebcache" ] ; then
622   cd $QUICKSTART_HOME/cachedfeeder
623   ./buildWebCache
624   exit
625 fi
626
627 if [ "$1" = "-deploywebcache" ] ; then
628   cd $QUICKSTART_HOME/cachedfeeder
629   $JAVA_HOME/bin/java -classpath $CLASSPATH $ant_xmllogfile -Dant.home=$ANT_HOME org.apache.tools.ant.launch.Launcher \
630                  $BWCONFIG $ant_listener $ant_logger $ant_loglevel $bw_loglevel -lib $QUICKSTART_HOME/bedework/build/quickstart/antlib deploy-webcache
631   exit
632 fi
633
634 if [ "$1" = "-deployurlbuilder" ] ; then
635   cd $QUICKSTART_HOME/cachedfeeder
636   $JAVA_HOME/bin/java -classpath $CLASSPATH $ant_xmllogfile -Dant.home=$ANT_HOME org.apache.tools.ant.launch.Launcher \
637                  $BWCONFIG $ant_listener $ant_logger $ant_loglevel $bw_loglevel -lib $QUICKSTART_HOME/bedework/build/quickstart/antlib deploy-urlbuilder
638   exit
639 fi
640
641 # ----------------------------------------------------------------------------
642 #  Here we go through looking for arguments.
643
644 #  Look firther down for wher we are specifying projects to build. I've
645 #  not tried specifying more than one but I think it would work.
646
647 #  There's a hidden default project "bedework" which you get if you don't specify
648 #  any of the below projects. That gets turned off by each of them  with
649 #        pkgdefault=
650 #  Each also turns on it's own project build and any dependencies it has.
651 #  Further up in this file is where we build each project that has been turned
652 #  on. That processing is done in dependency order. Of course this whole process
653 #  fails if we ever build in a circular dependency - that's why it's important to
654 #  do a clean build fairly regularly. So as an example
655 #   -webdav)
656 #      webdav="yes"
657 #
658 #      access="yes"
659 #      bwxml="yes"
660 #      rpiutil="yes"
661 #      pkgdefault=
662 #  Turns on the webdav build and also access, bwxml and rpiutil because it depends
663 #  on them.
664 # ----------------------------------------------------------------------------
665
666 while [ "$1" != "" ]
667 do
668   # Process the next arg
669   case $1       # Look at $1
670   in
671     -bwchome)         # Define location of configs
672       shift
673       BWCONFIGS="$1"
674       shift
675       ;;
676     -quickstart)
677       quickstart="yes"
678       shift
679       ;;
680     -usage | -help | -? | ?)
681       usage
682       exit
683       shift
684       ;;
685     -bwc)
686       shift
687       bwc="$1"
688       shift
689       ;;
690     -offline)
691       offline="-Dorg.bedework.offline.build=yes"
692       shift
693       ;;
694 # ----------------------- Log level       
695     -log-silent)
696       ant_loglevel="-quiet"
697       bw_loglevel="-Dorg.bedework.build.silent=true"
698       shift
699       ;;
700     -log-quiet)
701       ant_loglevel="-quiet"
702       bw_loglevel=""
703       shift
704       ;;
705     -log-inform)
706       ant_loglevel=""
707       bw_loglevel="-Dorg.bedework.build.inform=true"
708       shift
709       ;;
710     -log-verbose)
711       ant_loglevel="-verbose"
712       bw_loglevel="-Dorg.bedework.build.inform=true -Dorg.bedework.build.noisy=true"
713       shift
714       ;;
715     -log-configs)
716       bw_loglevel="$bw_loglevel -Dorg.bedework.build.showconfigs=true"
717       shift
718       ;;
719     -ant-debug)
720       ant_loglevel="-debug"
721       shift
722       ;;
723     -build-debug)
724       bw_loglevel="-Dorg.bedework.build.inform=true -Dorg.bedework.build.noisy=true -Dorg.bedework.build.debug=true "
725       shift
726       ;;
727 # ------------------------Special targets
728     deploylog4j)
729           deploylog4j="yes"
730       pkgdefault=
731       shift
732       ;;
733     deployActivemq)
734           deployActivemq="yes"
735       pkgdefault=
736       shift
737       ;;
738         dirstart)
739           dirstart="yes"
740       pkgdefault=
741       shift
742       ;;
743 # ------------------------Projects
744     -access)
745       access="yes"
746      
747       bwxml="yes"
748       rpiutil="yes"
749       pkgdefault=
750       shift
751       ;;
752     -bedenote)
753       bedenote="yes"
754       pkgdefault=
755       shift
756       ;;
757     -bwann)
758       bwannotations="yes"
759       pkgdefault=
760       shift
761       ;;
762     -bwcaldav)
763       bwcaldav="yes"
764      
765       access="yes"
766       bwannotations="yes" 
767       bwcalfacade="yes"
768       bwicalendar="yes"
769       bwinterfaces="yes"
770 #      bwmisc="yes"
771       bwsysevents="yes"
772       bwxml="yes"
773       caldav="yes"
774 #      davutil="yes"
775       rpiutil="yes"
776       webdav="yes"
777       pkgdefault=
778       shift
779       ;;
780     -bwcalcore)
781       bwcalcore="yes"
782      
783       access="yes"
784       bwannotations="yes" 
785       bwcalfacade="yes"
786       bwicalendar="yes"
787       bwinterfaces="yes"
788       bwmisc="yes"
789       bwsysevents="yes"
790       bwxml="yes"
791       caldav="yes"
792       davutil="yes"
793       rpiutil="yes"
794       webdav="yes"
795       pkgdefault=
796       shift
797       ;;
798     -bwcalfacade)
799       bwcalfacade="yes"
800    
801       access="yes"
802       bwannotations="yes"
803       bwxml="yes"
804       caldav="yes"
805       davutil="yes"
806       rpiutil="yes"
807       webdav="yes"
808       pkgdefault=
809       shift
810       ;;
811     -bwicalendar)
812       bwicalendar="yes"
813    
814       bwannotations="yes"
815       bwcalfacade="yes"
816       bwxml="yes"
817      
818       pkgdefault=
819       shift
820       ;;
821     -bwinterfaces)
822       bwinterfaces="yes"
823    
824       access="yes"
825       bwannotations="yes"
826       bwcalfacade="yes"
827       bwxml="yes"
828       caldav="yes"
829       davutil="yes"
830       rpiutil="yes"
831       webdav="yes"
832      
833       pkgdefault=
834       shift
835       ;;
836     -bwmisc)
837       bwmisc="yes"
838      
839       bwannotations="yes" 
840       bwcalfacade="yes"
841       bwicalendar="yes"
842       davutil="yes"
843       pkgdefault=
844       shift
845       ;;
846     -bwsysevents)
847       bwsysevents="yes"
848      
849       bwinterfaces="yes"
850       pkgdefault=
851       shift
852       ;;
853     -bwtools)
854       bwtools="yes"
855      
856       bwannotations="yes" 
857       bwcalfacade="yes"
858       bwinterfaces="yes"
859       bwxml="yes"
860       rpiutil="yes"
861       pkgdefault=
862       shift
863       ;;
864     -bwwebapps)
865       bwwebapps="yes"
866      
867       access="yes"
868       bwannotations="yes" 
869       bwcalfacade="yes"
870       bwicalendar="yes"
871       bwinterfaces="yes"
872       bwxml="yes"
873       caldav="yes"
874       davutil="yes"
875       rpiutil="yes"
876       webdav="yes"
877       pkgdefault=
878       shift
879       ;;
880     -bwxml)
881       bwxml="yes"
882       pkgdefault=
883       shift
884       ;;
885     -caldav)
886       caldav="yes"
887
888       access="yes"
889       bwxml="yes"
890       rpiutil="yes"
891       davutil="yes"
892       webdav="yes"
893       pkgdefault=
894       shift
895       ;;
896     -caldavTest)
897       caldavTest="yes"
898
899       access="yes"
900       bwxml="yes"
901       rpiutil="yes"
902       webdav="yes"
903       pkgdefault=
904       shift
905       ;;
906     -carddav)
907       carddav="yes"
908
909       access="yes"
910       bwxml="yes"
911       davutil="yes"
912       rpiutil="yes"
913       webdav="yes"
914       pkgdefault=
915       shift
916       ;;
917     -catsvr)
918       catsvr="yes"
919
920       access="yes"
921       bwxml="yes"
922       rpiutil="yes"
923       webdav="yes"
924       pkgdefault=
925       shift
926       ;;
927     -client)
928       client="yes"
929       pkgdefault=
930       shift
931       ;;
932     -davutil)
933       davutil="yes"
934
935       bwxml="yes"
936       rpiutil="yes"
937       pkgdefault=
938       shift
939       ;;
940     -deployutil)
941       bwdeployutil="yes"
942
943       pkgdefault=
944       shift
945       ;;
946     -dumprestore)
947       dumprestore="yes"
948      
949       access="yes"
950       bwannotations="yes" 
951       bwcalcore="yes"   
952       bwcalfacade="yes"
953       bwicalendar="yes"
954       bwinterfaces="yes"
955       bwmisc="yes"
956       bwsysevents="yes"
957       indexer="yes"
958       rpiutil="yes"
959       pkgdefault=
960       shift
961       ;;
962     -geronimohib)
963       geronimoHib="yes"
964
965       pkgdefault=
966       shift
967       ;;
968     -indexer)
969       indexer="yes"
970      
971       access="yes"
972       bwannotations="yes" 
973       bwcalcore="yes"   
974       bwcalfacade="yes"
975       bwicalendar="yes"
976       bwinterfaces="yes"
977       bwmisc="yes"
978       bwsysevents="yes"
979       rpiutil="yes"
980       pkgdefault=
981       shift
982       ;;
983     -monitor)
984       monitor="yes"
985       pkgdefault=
986       shift
987       ;;
988     -naming)
989       naming="yes"
990       pkgdefault=
991       shift
992       ;;
993     -rpiutil)
994       rpiutil="yes"
995
996       bwxml="yes"
997       pkgdefault=
998       shift
999       ;;
1000     -exchgGateway)
1001       exchgGateway="yes"
1002      
1003 #      access="yes"
1004       bwxml="yes"
1005 #      davutil="yes"
1006 #      rpiutil="yes"
1007       pkgdefault=
1008       shift
1009       ;;
1010     -synch)
1011       synch="yes"
1012      
1013       access="yes"
1014       bwxml="yes"
1015       davutil="yes"
1016       rpiutil="yes"
1017       pkgdefault=
1018       shift
1019       ;;
1020     -testsuite)
1021       testsuite="yes"
1022      
1023       pkgdefault="yes"
1024       shift
1025       ;;
1026     -tzsvr)
1027       tzsvr="yes"
1028       bwxml="yes"
1029       rpiutil="yes"
1030       pkgdefault=
1031       shift
1032       ;;
1033     -webdav)
1034       webdav="yes"
1035
1036       access="yes"
1037       bwxml="yes"
1038       davutil="yes"
1039       rpiutil="yes"
1040       pkgdefault=
1041       shift
1042       ;;
1043     -*)
1044       usage
1045       exit 1
1046       ;;
1047     *)
1048       # Assume we've reached the target(s)
1049       break
1050       ;;
1051   esac
1052 done
1053
1054 if [ "$pkgdefault" = "yes" ] ; then
1055   bedework="yes"
1056
1057   access="yes"
1058   bwannotations="yes" 
1059   bwcalcore="yes"   
1060   bwcaldav="yes"   
1061   bwcalfacade="yes"
1062   bwicalendar="yes"
1063   bwinterfaces="yes"
1064   bwmisc="yes"
1065   bwsysevents="yes"
1066   bwwebapps="yes"
1067   bwxml="yes"
1068   caldav="yes"
1069   davutil="yes"
1070   dumprestore="yes"
1071   indexer="yes"
1072   rpiutil="yes"
1073   webdav="yes"
1074 fi
1075
1076 if [ "$quickstart" != "" ] ; then
1077   if [ "$BWCONFIGS" != "" ] ; then
1078     errorUsage "Cannot specify both -quickstart and -bwchome"
1079   fi
1080   if [ "$bwc" = "jboss" ] ; then
1081         errorUsage "The jboss configuration has been removed from the quickstart.  It is now the default.  Remove the '-bwc jboss' option."
1082   fi
1083
1084   BWCONFIGS=$QUICKSTART_HOME/bedework/config/bwbuild
1085 elif [ "$BWCONFIGS" = "" ] ; then
1086   BWCONFIGS=$HOME/bwbuild
1087 fi
1088
1089 export BEDEWORK_CONFIGS_HOME=$BWCONFIGS
1090 export BEDEWORK_CONFIG=$BWCONFIGS/$bwc
1091
1092 if [ ! -d "$BEDEWORK_CONFIGS_HOME/.platform" ] ; then
1093   errorUsage "Configurations directory $BEDEWORK_CONFIGS_HOME is missing directory '.platform'."
1094 fi
1095
1096 if [ ! -d "$BEDEWORK_CONFIGS_HOME/.defaults" ] ; then
1097   errorUsage "Configurations directory $BEDEWORK_CONFIGS_HOME is missing directory '.defaults'."
1098 fi
1099
1100 if [ ! -f "$BEDEWORK_CONFIG/build.properties" ] ; then
1101   errorUsage "Configuration $BEDEWORK_CONFIG does not exist or is not a bedework configuration."
1102 fi
1103
1104 # Make available for ant
1105 export BWCONFIG="-Dorg.bedework.build.properties=$BEDEWORK_CONFIG/build.properties"
1106
1107 echo "BWCONFIGS=$BWCONFIGS"
1108 echo "BWCONFIG=$BWCONFIG"
1109
1110 javacmd="$JAVA_HOME/bin/java -classpath $CLASSPATH"
1111 # Build (of bwxml) blew up with permgen error
1112 javacmd="$javacmd -Xmx512M -XX:MaxPermSize=512M"
1113
1114 javacmd="$javacmd $ant_xmllogfile $offline"
1115 javacmd="$javacmd -Dant.home=$ANT_HOME org.apache.tools.ant.launch.Launcher"
1116 javacmd="$javacmd $BWCONFIG"
1117 javacmd="$javacmd $ant_listener $ant_logger $ant_loglevel $bw_loglevel"
1118 javacmd="$javacmd -lib $QUICKSTART_HOME/bedework/build/quickstart/antlib"
1119
1120 while true
1121 do
1122   setDirectory
1123  
1124   if [ "$specialTarget" != "" ] ; then
1125     $javacmd $specialTarget
1126   else 
1127 #    echo $javacmd $*
1128     $javacmd $*
1129   fi
1130 done
1131  
Note: See TracBrowser for help on using the browser.