root/trunk/build/quickstart/linux/bw

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

Add deployActivemq and deploySolr targets and related properties

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