<commit_before>#! /bin/sh

#
# This file is included by the quickstart script file "bw" so that it can live
# within the svn repository.
#

saveddir=`pwd`

trap 'cd $saveddir' 0
trap "exit 2" 1 2 3 15

export QUICKSTART_HOME=$saveddir

bw_loglevel=""
postDeployDebug="";
deployConfig="./bedework/config/wildfly.deploy.properties"

mvn_quiet=   # "-q"
mvnProfile="bedework-3"

#mvn_binary="/usr/share/maven/bin/mvn";
mvn_binary="mvn"

mvnUpdateProjects="bedework"
mvnUpdateProjects="$mvnUpdateProjects  bw-access"
mvnUpdateProjects="$mvnUpdateProjects  bw-cache-proxy"
mvnUpdateProjects="$mvnUpdateProjects  bw-caldav"
mvnUpdateProjects="$mvnUpdateProjects  bw-calendar-client"
mvnUpdateProjects="$mvnUpdateProjects  bw-calendar-engine"
mvnUpdateProjects="$mvnUpdateProjects  bw-calsockets"
mvnUpdateProjects="$mvnUpdateProjects  bw-carddav"
mvnUpdateProjects="$mvnUpdateProjects  bw-cli"
mvnUpdateProjects="$mvnUpdateProjects  bw-dotwell-known"
mvnUpdateProjects="$mvnUpdateProjects  bw-event-registration"
mvnUpdateProjects="$mvnUpdateProjects  bw-notifier"
mvnUpdateProjects="$mvnUpdateProjects  bw-self-registration"
mvnUpdateProjects="$mvnUpdateProjects  bw-synch"
mvnUpdateProjects="$mvnUpdateProjects  bw-timezone-server"
mvnUpdateProjects="$mvnUpdateProjects  bw-util"
mvnUpdateProjects="$mvnUpdateProjects  bw-util2"
mvnUpdateProjects="$mvnUpdateProjects  bw-util-hibernate"
mvnUpdateProjects="$mvnUpdateProjects  bw-util-logging"
mvnUpdateProjects="$mvnUpdateProjects  bw-webdav"
mvnUpdateProjects="$mvnUpdateProjects  bw-xml"

# Projects we will build - pkgdefault (bedework) is built if nothing specified
pkgdefault=yes
access=
bedework=
bwcalclient=
bwcaleng=
bwcli=
bwnotifier=
bwcalsockets=
bwxml=
caldav=
caldavTest=
carddav=
catsvr=
client=
dotWellKnown=
eventreg=
exchgGateway=
naming=
bwutil=
bwutilhib=
bwutil2=
bwutildeploy=
bwutillog=
selfreg=
synch=
testsuite=
tzsvr=
webdav=
xsl=

# Special targets - avoiding dependencies

cmdutil=
deployer=
deploylog4j=
deploywf=
deployConf=
deployData=
deployWebcache=
saveData=

specialTarget=

dobuild=yes

mavenRepoLocal=

appserver="-Dorg.bedework.target.appserver=wildfly"

echo ""
echo "  Bedework Calendar System"
echo "  ------------------------"
echo ""

PRG="$0"

usage() {
  echo "The build and deploy process is changed from previous releases."
  echo ""
  echo "Nearly all configuration is handled by the run-time configuration"
  echo "files deployed with the "
  echo "   deployConf "
  echo "target. That target should be executed ONCE only after download "
  echo "to copy a set of config files into jboss."
  echo ""
  echo "A small amount of post-build configuration may be needed. This "
  echo "allows you to set the security-domain, transport guarantees, "
  echo "virtual hosts and add or remove calendar suites."
  echo "See"
  echo "http://wiki.jasig.org/display/BWK310/Configuring+Bedework"
  echo ""
  echo "  $PRG ACTION"
  echo "  $PRG [-dc CONFIG-SOURCE] [-P PROFILE] [PROJECT] [ -offline ] "
  echo "              [-appserver=<server>]"
  echo "              [LOG_LEVEL] [ target ] "
  echo ""
  echo " where:"
  echo ""
  echo "   ACTION defines an action to take usually in the context of the quickstart."
  echo "    In a deployed system many of these actions are handled directly by a"
  echo "    deployed application. ACTION may be one of"
  echo "      -updateall  Does an svn update of all projects"
  echo ""
  echo "   CONFIG-SOURCE optionally defines the location of the deploy properties"
  echo "   The default is in $deployConfig."
  echo ""
  echo "   PROFILE optionally defines the maven profile to use"
  echo "   The default is $mvnProfile."
  echo ""
  echo "   -offline     Build without attempting to retrieve library jars"
  echo ""
  echo "   -appserver=wildfly Build for wildfly - the default"
  echo "   -appserver=jboss5  Build for jboss 5"
  echo ""
  echo "   LOG_LEVEL sets the level of logging and can be"
  echo "      -log-silent   Nearly silent"
  echo "      -log-quiet    The default"
  echo "      -log-inform   A little more noisy"
  echo "      -log-verbose  Noisier"
  echo "      -log-configs  Some info about configurations"
  echo "      -build-debug  Some bedework build debug output"
  echo ""
  echo "   target       Special target or compile target"
  echo ""
  echo "   Special targets"
  echo "      deployer          builds the deployer"
  echo "      deploylog4j       deploys a log4j configuration"
  echo "      deploywf          deploys wildfly configuration"
  echo "      deployConf        deploys the configuration files"
  echo ""
  echo "   PROJECT optionally defines the package to build. If omitted the main"
  echo "           bedework calendar system will be built otherwise it is one of"
  echo "           the core, ancillary or experimental targets below:"
  echo ""
  echo "   Core sub-projects: required for a functioning system"
  echo "     -access       Target is for the access classes"
  echo "     -bwcalclient  Target is for the bedework client implementation"
  echo "     -bwcaleng     Target is for the bedework cal engine implementation"
  echo "     -bwcalsockets Target is for the bedework calsockets classes"
  echo "     -bwxml        Target is for the Bedework XML schemas build"
  echo "                        (usually built automatically be dependent projects"
  echo "     -caldav       Target is for the generic CalDAV server"
  echo "     -carddav      Target is for the CardDAV build"
  echo "     -carddav deploy-addrbook    To deploy the Javascript Addressbook client."
  echo "     -eventreg     Target is for the event registration service build"
  echo "     -notifier     Target is the Bedework notification service"
  echo "     -bwutil       Target is for the Bedework util classes"
  echo "     -bwutil2      Target is for the Bedework util2 classes"
  echo "     -bwutilhib    Target is for the Bedework hibernate util classes"
  echo "     -bwutillog    Target is for the Bedework logging util classes"
  echo "     -bwutildeploy Target is for the Bedework deployment util classes"
  echo "     -selfreg      Target is for the self registration build"
  echo "     -synch        Target is for the synch build"
  echo "     -tzsvr        Target is for the timezones server build"
  echo "     -webdav       Target is for the WebDAV build"
  echo "     -xsl          Target is for the XSL module build"
  echo "   Ancillary projects: not required"
  echo "     -caldavTest   Target is for the CalDAV Test build"
  echo "     -testsuite    Target is for the bedework test suite"
  echo "   Experimental projects: no guarantees"
  echo "     -catsvr       Target is for the Catsvr build"
  echo "     -client       Target is for the bedework client application build"
  echo "     -naming       Target is for the abstract naming api"
  echo ""
  echo "   Invokes maven to build or deploy the Bedework system. "
  echo ""
}

errorUsage() {
  echo "*******************************************************************************************"
  echo "Error: $1"
  echo "*******************************************************************************************"
  echo
  echo "Sleeping 5 seconds before displaying usage. Safe to ctrl-C."
  sleep 5
  echo ""
  usage
  exit 1
}

# ----------------------------------------------------------------------------
# Update the projects
# ----------------------------------------------------------------------------
actionUpdateall() {
  for project in $mvnUpdateProjects<commit_msg>Fix bw help<commit_after>#! /bin/sh

#
# This file is included by the quickstart script file "bw" so that it can live
# within the svn repository.
#

saveddir=`pwd`

trap 'cd $saveddir' 0
trap "exit 2" 1 2 3 15

export QUICKSTART_HOME=$saveddir

bw_loglevel=""
postDeployDebug="";
deployConfig="./bedework/config/wildfly.deploy.properties"

mvn_quiet=   # "-q"
mvnProfile="bedework-3"

#mvn_binary="/usr/share/maven/bin/mvn";
mvn_binary="mvn"

mvnUpdateProjects="bedework"
mvnUpdateProjects="$mvnUpdateProjects  bw-access"
mvnUpdateProjects="$mvnUpdateProjects  bw-cache-proxy"
mvnUpdateProjects="$mvnUpdateProjects  bw-caldav"
mvnUpdateProjects="$mvnUpdateProjects  bw-calendar-client"
mvnUpdateProjects="$mvnUpdateProjects  bw-calendar-engine"
mvnUpdateProjects="$mvnUpdateProjects  bw-calsockets"
mvnUpdateProjects="$mvnUpdateProjects  bw-carddav"
mvnUpdateProjects="$mvnUpdateProjects  bw-cli"
mvnUpdateProjects="$mvnUpdateProjects  bw-dotwell-known"
mvnUpdateProjects="$mvnUpdateProjects  bw-event-registration"
mvnUpdateProjects="$mvnUpdateProjects  bw-notifier"
mvnUpdateProjects="$mvnUpdateProjects  bw-self-registration"
mvnUpdateProjects="$mvnUpdateProjects  bw-synch"
mvnUpdateProjects="$mvnUpdateProjects  bw-timezone-server"
mvnUpdateProjects="$mvnUpdateProjects  bw-util"
mvnUpdateProjects="$mvnUpdateProjects  bw-util2"
mvnUpdateProjects="$mvnUpdateProjects  bw-util-hibernate"
mvnUpdateProjects="$mvnUpdateProjects  bw-util-logging"
mvnUpdateProjects="$mvnUpdateProjects  bw-webdav"
mvnUpdateProjects="$mvnUpdateProjects  bw-xml"

# Projects we will build - pkgdefault (bedework) is built if nothing specified
pkgdefault=yes
access=
bedework=
bwcalclient=
bwcaleng=
bwcli=
bwnotifier=
bwcalsockets=
bwxml=
caldav=
caldavTest=
carddav=
catsvr=
client=
dotWellKnown=
eventreg=
exchgGateway=
naming=
bwutil=
bwutilhib=
bwutil2=
bwutildeploy=
bwutillog=
selfreg=
synch=
testsuite=
tzsvr=
webdav=
xsl=

# Special targets - avoiding dependencies

cmdutil=
deployer=
deploylog4j=
deploywf=
deployConf=
deployData=
deployWebcache=
saveData=

specialTarget=

dobuild=yes

mavenRepoLocal=

appserver="-Dorg.bedework.target.appserver=wildfly"

echo ""
echo "  Bedework Calendar System"
echo "  ------------------------"
echo ""

PRG="$0"

usage() {
  echo "The build and deploy process is changed from previous releases."
  echo ""
  echo "Nearly all configuration is handled by the run-time configuration"
  echo "files deployed with the "
  echo "   deployConf "
  echo "target. That target should be executed ONCE only after download "
  echo "to copy a set of config files into jboss."
  echo ""
  echo "A small amount of post-build configuration may be needed. This "
  echo "allows you to set the security-domain, transport guarantees, "
  echo "virtual hosts and add or remove calendar suites."
  echo "See"
  echo "http://wiki.jasig.org/display/BWK310/Configuring+Bedework"
  echo ""
  echo "  $PRG ACTION"
  echo "  $PRG [-dc CONFIG-SOURCE] [-P PROFILE] [PROJECT] [ -offline ] "
  echo "              [-appserver=<server>]"
  echo "              [LOG_LEVEL] [ target ] "
  echo ""
  echo " where:"
  echo ""
  echo "   ACTION defines an action to take usually in the context of the quickstart."
  echo "    In a deployed system many of these actions are handled directly by a"
  echo "    deployed application. ACTION may be one of"
  echo "      -updateall  Does an svn update of all projects"
  echo ""
  echo "   CONFIG-SOURCE optionally defines the location of the deploy properties"
  echo "   The default is in $deployConfig."
  echo ""
  echo "   PROFILE optionally defines the maven profile to use"
  echo "   The default is $mvnProfile."
  echo ""
  echo "   -offline     Build without attempting to retrieve library jars"
  echo ""
  echo "   -appserver=wildfly Build for wildfly - the default"
  echo "   -appserver=jboss5  Build for jboss 5"
  echo ""
  echo "   LOG_LEVEL sets the level of logging and can be"
  echo "      -log-silent   Nearly silent"
  echo "      -log-quiet    The default"
  echo "      -log-inform   A little more noisy"
  echo "      -log-verbose  Noisier"
  echo "      -log-configs  Some info about configurations"
  echo "      -build-debug  Some bedework build debug output"
  echo ""
  echo "   target       Special target or compile target"
  echo ""
  echo "   Special targets"
  echo "      deployer          builds the deployer"
  echo "      deploylog4j       deploys a log4j configuration"
  echo "      deploywf          deploys wildfly configuration"
  echo "      deployConf        deploys the configuration files"
  echo ""
  echo "   PROJECT optionally defines the package to build. If omitted the main"
  echo "           bedework calendar system will be built otherwise it is one of"
  echo "           the core, ancillary or experimental targets below:"
  echo ""
  echo "   Core sub-projects: required for a functioning system"
  echo "     access       Target is for the access classes"
  echo "     bwcalclient  Target is for the bedework client implementation"
  echo "     bwcaleng     Target is for the bedework cal engine implementation"
  echo "     bwcalsockets Target is for the bedework calsockets classes"
  echo "     bwxml        Target is for the Bedework XML schemas build"
  echo "                        (usually built automatically be dependent projects"
  echo "     caldav       Target is for the generic CalDAV server"
  echo "     carddav      Target is for the CardDAV build"
  echo "     carddav deploy-addrbook    To deploy the Javascript Addressbook client."
  echo "     eventreg     Target is for the event registration service build"
  echo "     notifier     Target is the Bedework notification service"
  echo "     bwutil       Target is for the Bedework util classes"
  echo "     bwutil2      Target is for the Bedework util2 classes"
  echo "     bwutilhib    Target is for the Bedework hibernate util classes"
  echo "     bwutillog    Target is for the Bedework logging util classes"
  echo "     bwutildeploy Target is for the Bedework deployment util classes"
  echo "     selfreg      Target is for the self registration build"
  echo "     synch        Target is for the synch build"
  echo "     tzsvr        Target is for the timezones server build"
  echo "     webdav       Target is for the WebDAV build"
  echo "     xsl          Target is for the XSL module build"
  echo "   Ancillary projects: not required"
  echo "     caldavTest   Target is for the CalDAV Test build"
  echo "     testsuite    Target is for the bedework test suite"
  echo "   Experimental projects: no guarantees"
  echo "     catsvr       Target is for the Catsvr build"
  echo "     client       Target is for the bedework client application build"
  echo "     naming       Target is for the abstract naming api"
  echo ""
  echo "   Invokes maven to build or deploy the Bedework system. "
  echo ""
}

errorUsage() {
  echo "*******************************************************************************************"
  echo "Error: $1"
  echo "*******************************************************************************************"
  echo
  echo "Sleeping 5 seconds before displaying usage. Safe to ctrl-C."
  sleep 5
  echo ""
  usage
  exit 1
}

# ----------------------------------------------------------------------------
# Update the projects
# ----------------------------------------------------------------------------
actionUpdateall() {
  for project in $mvnUpdateProjects
{'fraction_non_alphanumeric': 0.1199733244414805, 'fraction_numerical': 0.003334444814938313, 'mean_word_length': 3.0705754614549403, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5258507', 'n_tokens_mistral': 4609, 'n_tokens_neox': 4386, 'n_words': 1517}