root/releases/bedework-3.8/build/quickstart/linux/bw

Revision 3602 (checked in by douglm, 10 months ago)

Add eventreg to the bw and bw.bat scripts

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