diff --git a/ccm-core/bin/ccm b/ccm-core/bin/ccm index c5deb51f9..0405157b3 100644 --- a/ccm-core/bin/ccm +++ b/ccm-core/bin/ccm @@ -10,16 +10,33 @@ # PATH, you have to adjust the paths. CCM_LIB_DIR="../lib" CCM_HOME_DIR="../.." -# Path of the lib directory of the Tomcat Server which runs the CCM installation. -# If the CATALINA_HOME enviroment variable is not set on your system you have -# either to set this environment variable (recommened) -# to adjust this path to point to the lib directory of your Tomcat installation -# (if you installed the Tomcat using the package manager of your distribution -# this is usally /usr/share/tomcat6/lib) -# To set an environment variable you have usally to add an file to the /etc/profile.d -# directory, for example tomcat.sh. In this file, you can set environment variables -# using the 'export' command. This line might look like this: -# export CATALINA_HOME=/usr/share/tomcat6/lib + +# We need CATALINA_HOME environment variable to access Tomcat's lib dir. +if [[ -z "$CATALINA_HOME" ]] ; then + echo CATALINE_HOME not set. Guessing ... + + if [ -f /etc/tomcat6/tomcat6.conf ] + then + . /etc/tomcat6/tomcat6.conf + echo + echo Using CATALINA_HOME = $CATALINA_HOME + echo If this doesn\'t work use + echo export CATALINA_HOME=/path/to/tomcat/installation + echo to point us to the correct location. + else + echo + echo =================================================== + echo Environment variable CATALINA_HOME not set. We need + echo to know the location of Tomcat\'s lib directory. + echo So use + echo export CATALINA_HOME=/path/to/tomcat/installation + echo to point us to the correct location and run ccm + echo again. + echo =================================================== + echo + exit 1 + fi +fi CATALINA_LIB_DIR="${CATALINA_HOME}/lib" # Script logic starts here @@ -32,9 +49,9 @@ then exit 1 fi -if [ ! -d ${CCM_HOME_DIR}/__ccm__ ] +if [ ! -d ${CCM_HOME_DIR}/WEB-INF ] then - echo "Error: CCM_HOME_DIR path is invalid \(no __ccm__ directory in CCM_HOME_DIR\)." + echo "Error: CCM_HOME_DIR path is invalid \(no WEB-INF directory in CCM_HOME_DIR\)." exit 1 fi @@ -48,4 +65,16 @@ fi CCM_HOME_DIR=`cd ${CCM_HOME_DIR}; pwd` echo "Starting CCM-Tool..." -java -cp ${CCM_LIB_DIR}/"*":${CATALINA_LIB_DIR}/"*" -Dccm.home=${CCM_HOME_DIR} "com.arsdigita.packaging.MasterTool" "$@" \ No newline at end of file +if [ "$1" = "prepare" ] ; then + echo + echo ===================================== + echo $1: + echo - Initializes ccm after installation. + echo - Execute only ONCE! + echo ===================================== + echo + param="load --interactive --packagekeys-file bundle/cfg/package-key.list --parameter-file bundle/cfg/integration.properties" + java -cp ${CCM_LIB_DIR}/"*":${CATALINA_LIB_DIR}/"*" -Dccm.home=${CCM_HOME_DIR} "com.arsdigita.packaging.MasterTool" $param +else + java -cp ${CCM_LIB_DIR}/"*":${CATALINA_LIB_DIR}/"*" -Dccm.home=${CCM_HOME_DIR} "com.arsdigita.packaging.MasterTool" "$@" +fi diff --git a/ccm-core/bin/ccm-run b/ccm-core/bin/ccm-run old mode 100755 new mode 100644 index d0e997f30..85240cb01 --- a/ccm-core/bin/ccm-run +++ b/ccm-core/bin/ccm-run @@ -1,48 +1,51 @@ #!/bin/bash -set -x +# This script is a wrapper for calling the CCM commandline utilites +# used for maintence of a CCM installation. -if [ -z "$CCM_HOME" ] +# Variables for directories. +# The path are relative to the bin directory of the CCM installation. This +# means that this script has to be executed from the bin directory. If you +# want to use this script from another directory, or include it into your +# PATH, you have to adjust the paths. +CCM_LIB_DIR="../lib" +CCM_HOME_DIR="../.." +# Path of the lib directory of the Tomcat Server which runs the CCM installation. +# If the CATALINA_HOME enviroment variable is not set on your system you have +# either to set this environment variable (recommened) +# to adjust this path to point to the lib directory of your Tomcat installation +# (if you installed the Tomcat using the package manager of your distribution +# this is usally /usr/share/tomcat6/lib) +# To set an environment variable you have usally to add an file to the /etc/profile.d +# directory, for example tomcat.sh. In this file, you can set environment variables +# using the 'export' command. This line might look like this: +# export CATALINA_HOME=/usr/share/tomcat6/lib +CATALINA_LIB_DIR="${CATALINA_HOME}/lib" + +# Script logic starts here +echo "checking if all paths are correct..." +files=$(ls ${CCM_LIB_DIR}/ccm-core*.jar 2> /dev/null | wc -l) + +if [ "$files" == "0" ] then - return 1 + echo "Error: CCM_LIB_DIR is invalid \(no ccm-core*.jar file\(s\) in CCM_LIB_DIR\)." + exit 1 fi -# System values -[ -f "/etc/ccm/ccm.conf" ] && . "/etc/ccm/ccm.conf" - -# Optional server-specific values -[ -f "$CCM_HOME/conf/ccm.conf" ] && . "$CCM_HOME/conf/ccm.conf" - -if [ -z "$CCM_CLASSPATH" ] +if [ ! -d ${CCM_HOME_DIR}/__ccm__ ] then - - CCM_CLASSPATH="$CCM_CLASSPATH_CUSTOM" - - for dir in `ls -d $CCM_HOME/conf/*` - do - CCM_CLASSPATH=$CCM_CLASSPATH:$dir - done - - if [ -n "$CCM_APPS" ] - then - for APP in $CCM_APPS - do - [ -f "/usr/share/java/$APP.jar" ] && CCM_CLASSPATH="$CCM_CLASSPATH:/usr/share/java/$APP.jar" - if [ -d "/usr/share/java/$APP" ] - then - for file in `ls /usr/share/java/$APP` - do - CCM_CLASSPATH=$CCM_CLASSPATH:/usr/share/java/$APP/$file - done - fi - done - else - echo foo - fi + echo "Error: CCM_HOME_DIR path is invalid \(no __ccm__ directory in CCM_HOME_DIR\)." + exit 1 fi -CCM_CLASSPATH=`echo $CCM_CLASSPATH | sed -e 's/::/:/g' | sed -e 's/:$//' | sed -e 's/^://'` +if [ ! -f ${CATALINA_LIB_DIR}/catalina.jar ] +then + echo "Error: CATALINA_LIB_DIR is invalid \(no catalina.jar in CATALINA_LIB_DIR\)." + exit 1 +fi -echo $CCM_CLASSPATH | tr : "\n" +#Convert to absolute path: +CCM_HOME_DIR=`cd ${CCM_HOME_DIR}; pwd` -java -cp $CCM_CLASSPATH -Dccm.home=$CCM_HOME "$@" +echo "executing ccm-run" +java -cp ${CCM_LIB_DIR}/"*":${CATALINA_LIB_DIR}/"*" -Dccm.home=${CCM_HOME_DIR} "$@" \ No newline at end of file diff --git a/ccm-core/bin/ccm-run.old b/ccm-core/bin/ccm-run.old new file mode 100755 index 000000000..d0e997f30 --- /dev/null +++ b/ccm-core/bin/ccm-run.old @@ -0,0 +1,48 @@ +#!/bin/bash + +set -x + +if [ -z "$CCM_HOME" ] +then + return 1 +fi + +# System values +[ -f "/etc/ccm/ccm.conf" ] && . "/etc/ccm/ccm.conf" + +# Optional server-specific values +[ -f "$CCM_HOME/conf/ccm.conf" ] && . "$CCM_HOME/conf/ccm.conf" + +if [ -z "$CCM_CLASSPATH" ] +then + + CCM_CLASSPATH="$CCM_CLASSPATH_CUSTOM" + + for dir in `ls -d $CCM_HOME/conf/*` + do + CCM_CLASSPATH=$CCM_CLASSPATH:$dir + done + + if [ -n "$CCM_APPS" ] + then + for APP in $CCM_APPS + do + [ -f "/usr/share/java/$APP.jar" ] && CCM_CLASSPATH="$CCM_CLASSPATH:/usr/share/java/$APP.jar" + if [ -d "/usr/share/java/$APP" ] + then + for file in `ls /usr/share/java/$APP` + do + CCM_CLASSPATH=$CCM_CLASSPATH:/usr/share/java/$APP/$file + done + fi + done + else + echo foo + fi +fi + +CCM_CLASSPATH=`echo $CCM_CLASSPATH | sed -e 's/::/:/g' | sed -e 's/:$//' | sed -e 's/^://'` + +echo $CCM_CLASSPATH | tr : "\n" + +java -cp $CCM_CLASSPATH -Dccm.home=$CCM_HOME "$@" diff --git a/ccm-core/bin/ccm-run2 b/ccm-core/bin/ccm-run2 deleted file mode 100644 index 85240cb01..000000000 --- a/ccm-core/bin/ccm-run2 +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -# This script is a wrapper for calling the CCM commandline utilites -# used for maintence of a CCM installation. - -# Variables for directories. -# The path are relative to the bin directory of the CCM installation. This -# means that this script has to be executed from the bin directory. If you -# want to use this script from another directory, or include it into your -# PATH, you have to adjust the paths. -CCM_LIB_DIR="../lib" -CCM_HOME_DIR="../.." -# Path of the lib directory of the Tomcat Server which runs the CCM installation. -# If the CATALINA_HOME enviroment variable is not set on your system you have -# either to set this environment variable (recommened) -# to adjust this path to point to the lib directory of your Tomcat installation -# (if you installed the Tomcat using the package manager of your distribution -# this is usally /usr/share/tomcat6/lib) -# To set an environment variable you have usally to add an file to the /etc/profile.d -# directory, for example tomcat.sh. In this file, you can set environment variables -# using the 'export' command. This line might look like this: -# export CATALINA_HOME=/usr/share/tomcat6/lib -CATALINA_LIB_DIR="${CATALINA_HOME}/lib" - -# Script logic starts here -echo "checking if all paths are correct..." -files=$(ls ${CCM_LIB_DIR}/ccm-core*.jar 2> /dev/null | wc -l) - -if [ "$files" == "0" ] -then - echo "Error: CCM_LIB_DIR is invalid \(no ccm-core*.jar file\(s\) in CCM_LIB_DIR\)." - exit 1 -fi - -if [ ! -d ${CCM_HOME_DIR}/__ccm__ ] -then - echo "Error: CCM_HOME_DIR path is invalid \(no __ccm__ directory in CCM_HOME_DIR\)." - exit 1 -fi - -if [ ! -f ${CATALINA_LIB_DIR}/catalina.jar ] -then - echo "Error: CATALINA_LIB_DIR is invalid \(no catalina.jar in CATALINA_LIB_DIR\)." - exit 1 -fi - -#Convert to absolute path: -CCM_HOME_DIR=`cd ${CCM_HOME_DIR}; pwd` - -echo "executing ccm-run" -java -cp ${CCM_LIB_DIR}/"*":${CATALINA_LIB_DIR}/"*" -Dccm.home=${CCM_HOME_DIR} "$@" \ No newline at end of file diff --git a/ccm-core/bin/deploy2jboss.sh b/ccm-core/bin/deploy2jboss.sh deleted file mode 100755 index 476f75f74..000000000 --- a/ccm-core/bin/deploy2jboss.sh +++ /dev/null @@ -1,348 +0,0 @@ -#!/bin/bash -set -e - -#NAME -# deploy2jboss.sh - deploy CCM webapps under JBoss AS 4.0.5 4.2.0 -# -#SYNOPSIS -# deploy2jboss.sh [--force] service_name [source_server_configuration]" -# -#DESCRIPTION -# jbossas RPM/Red Hat Application Stack (JBOSS_HOME not set) -# Creates new SysV service and JBoss AS server configuration based on -# source JBoss server configuration ( 'default' if not specified ). -# If JBOSS_HOME is set, normal JBoss installation is assumed -# and shell startup script is created in $JBOSS_HOME/bin - -# Requires: getopt sed jar java - -usage() { - echo "Usage: $0 [--force] service_name [source_server_configuration]" - exit 1 -} - -OPTS=`getopt -o f -l force -- "$@"` -if (($?)); then usage; fi -eval set -- "$OPTS" -FORCE=0 -while true; do - case "$1" in - -f|--force) FORCE=1; shift;; - --) shift; break;; - *) usage;; - esac -done - -if test -z "$1"; then - usage -fi -JBOSSCONF=$1 -SRCCONF=${2:-default} - -if [[ -z "$JBOSS_HOME" ]]; then - # JBoss paths for Red Hat Application Stack - JBOSS_HOME=/var/lib/jbossas - LOGDIR=/var/log/$JBOSSCONF - CONFDIR=/etc/jbossas - JBOSSUS=servlet - JBOSSGR=servlet - APPSTK=1 -else - APPSTK=0 -fi - -SUPPORTED_JBASVERS="4.0.5 4.2.0" -JBASVER=`java -jar $JBOSS_HOME/bin/run.jar -V|head -1|cut -d' ' -f2` -UNSUPPORTED=1 -for v in $SUPPORTED_JBASVERS; do - if [[ $JBASVER =~ $v ]]; then - UNSUPPORTED=0 - break - fi -done - -if (($UNSUPPORTED)); then - echo "JBoss AS version $JBASVER not supported. Please use one of $SUPPORTED_JBASVERS" - exit 1 -fi -if test ! -d $JBOSS_HOME/server/$SRCCONF; then - echo "server configuraton '$SRCCONF' doesn't exist" - exit 1 -fi - -echo "Deploying CCM_HOME=$CCM_HOME to JBOSS_HOME=$JBOSS_HOME/server/$JBOSSCONF" -if (($APPSTK)); then - echo "Application Stack detected" -fi - -# jboss.server.home.url -cd $JBOSS_HOME/server -if test -d $JBOSSCONF; then - echo -n "'$JBOSSCONF' already there, " - if (($FORCE)); then - echo -n "updating from '$SRCCONF'..." - rm -rf $JBOSSCONF - else - echo "aborting, use --force" - exit 1 - fi -else - echo -n "creating '$JBOSSCONF' from '$SRCCONF'..." -fi - -mkdir $JBOSSCONF -cd $JBOSSCONF -mkdir data -mkdir tmp -mkdir work -cp -rd --preserve=mode,timestamps $JBOSS_HOME/server/$SRCCONF/deploy . -cp -rd --preserve=mode,timestamps $JBOSS_HOME/server/$SRCCONF/lib . - -# JBoss options run.conf or rpmized /etc/jbossas/... -cat > /tmp/jbossconf$$.sed < LANG=en_US.UTF-8 workaround for ChainedResourceBundle -# Sun JDK JMX agent: -Dcom.sun.management.jmxremote -# JRockit Tools: -Xmanagement -# debugger: -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:8787,server=y,suspend=n - -if (($APPSTK)); then - # create new SysV service based on jbossas - cd /etc/init.d/ - if (($FORCE)); then - rm $JBOSSCONF - fi - if test ! -e $JBOSSCONF; then - ln -s jbossas $JBOSSCONF - fi - cd /etc/sysconfig/ - if (($FORCE)); then - rm $JBOSSCONF - fi - if test ! -e $JBOSSCONF; then - cp jbossas $JBOSSCONF - sed -i -f /tmp/jbossconf$$.sed $JBOSSCONF - fi - # jboss.server.log.dir - cd $LOGDIR - # re-create logdir on each deployment - rm -rf $JBOSSCONF - mkdir $JBOSSCONF - chown $JBOSSUS:$JBOSSGR $JBOSSCONF - - cd $JBOSS_HOME/server/$JBOSSCONF - chown $JBOSSUS:$JBOSSGR data - chown $JBOSSUS:$JBOSSGR tmp - chown $JBOSSUS:$JBOSSGR work - - if test ! -e log; then - ln -s $LOGDIR/$JBOSSCONF log - fi - if test ! -e conf; then - ln -s $CONFDIR/$JBOSSCONF conf - fi - -else - cd $JBOSS_HOME/bin - rm -f $JBOSSCONF.conf - cp run.conf $JBOSSCONF.conf - sed -i -f /tmp/jbossconf$$.sed $JBOSSCONF.conf - cd $JBOSS_HOME/server/$JBOSSCONF - cp -rd --preserve=mode,timestamps $JBOSS_HOME/server/$SRCCONF/conf . - mkdir log -fi -rm /tmp/jbossconf$$.sed - -# customize default JBoss services -if test -d deploy/jbossweb-tomcat55.sar/; then - # JBAS4.0.5 w/ Tomcat5.5 in jbossweb-tomcat55.sar - cd deploy/jbossweb-tomcat55.sar/ -elif test -d deploy/jboss-web.deployer/; then - # JBAS4.2.0 w/ Tomcat6.0 in jboss-web.deployer - cd deploy/jboss-web.deployer/ -else - echo "Tomcat not found in $SRCCONF. Please re-install JBoss AS or choose different source server configuration." - exit 1 -fi - -# rename Tomcat's default ROOT webapp -mv ROOT.war jbossweb.war -sed -i 's/href="\/status/href="status/' jbossweb.war/index.html - -echo "done." - -# WEBAPPS -# $JBOSSCONF/deploy/ -cd .. -# TODO option to deploy webapps directly from ccm-* RPMs -# ( /usr/share/java/webapps/ccm-*/ ) -# NB: default p2fs destinations in com.arsdigita.cms.enterprise.init: -# {ccm.home}data/p2fs and -# {ccm.home}webapps/ROOT/packages/content-section/templates - -# Use hostinit-ed CCM_HOME -for ccmwebapp in $CCM_HOME/webapps/ccm-*; do - name=$(basename $ccmwebapp) - ln -s $ccmwebapp $name.war -done -ln -s $CCM_HOME/webapps/ROOT ROOT.war - -# JARs -function extract_pkgs() { - pkgs=$(jar tf $1 |sed -rn '/^.+-INF/d;/\.class$/{s/\/[^\/]+\.class$//;p}' |sort -u) -} - -# shared CL location -# $JBOSSCONF/lib/ -cd ../lib -# development environment CCM_HOME -if test -d $CCM_HOME/webapps/WEB-INF/classes; then - echo -n "creating JAR from $CCM_HOME/webapps/WEB-INF/classes..." - jar cf ccm-ALL.jar -C $CCM_HOME/webapps/WEB-INF/classes . - echo "done." -fi -deployedpkgs="" -echo -n "Analyzing JBossAS JARs: " -for deployedjar in *jar $JBOSS_HOME/lib/endorsed/*jar; do - echo -n "$deployedjar " - extract_pkgs $deployedjar - deployedpkgs="$deployedpkgs $pkgs" -done -echo "done." - -# JAR conflict resolution: JBoss JARs have precedence -for ccmjar in $CCM_HOME/webapps/WEB-INF/lib/*jar; do - ccmjarbase=$(basename $ccmjar) - if test ${ccmjarbase:0:3} = "ccm"; then - ln -sf $ccmjar . - else - extract_pkgs $ccmjar - conflicts=0 - for pkg in $pkgs; do - if [[ $deployedpkgs =~ $pkg ]]; then - echo -n "$pkg CONFLICT " - conflicts=1 - break - fi - done - if (($conflicts)); then - echo "skipping $ccmjar" - else - ln -sf $ccmjar . - fi - fi -done - -# Add JDBC JARs -# use ccm-java RPM configuration if present -if test -e /etc/sysconfig/ccm-java; then - . /etc/sysconfig/ccm-java - if [[ -r "$ORACLE" ]]; then - ln -sf "$ORACLE" . - else - echo "Warning: Oracle JDBC JAR not found" - fi - if [[ -r "$POSTGRES" ]]; then - ln -sf "$POSTGRES" . - else - echo "Warning: PostgreSQL JDBC JAR not found" - fi -else - # no ccm-java, assume CCM dev.env. - # CLASSPATH which should include Oracle or PostgreSQL JDBC JAR - # set by ccm-profile - nojdbc=1 - IFS=: - for c in $CLASSPATH; do - if [[ $c =~ oracle ]] || [[ $c =~ postgresql ]]; then - if [[ -r $c ]]; then - ln -sf "$c" . - nojdbc=0 - fi - fi - done - IFS= - if (($nojdbc)); then - echo "Warning: JDBC JAR not found" - fi -fi - -if (($APPSTK)); then - cd $CONFDIR - # jboss.server.config.url - if (($FORCE)); then - rm -rf $JBOSSCONF - fi - if test ! -d $JBOSSCONF; then - cp -rd --preserve=mode,timestamps $SRCCONF $JBOSSCONF - fi - cd $JBOSSCONF -else - cd $JBOSS_HOME/server/$JBOSSCONF/conf -fi - -if test -e jboss-log4j.xml; then - # JBAS4.2 - LOG4J=jboss-log4j.xml -else - LOG4J=log4j.xml -fi - -# CCM log4j and XML/XSLT configuration is not used -if test ! -e $LOG4J.CCM; then - # 1st time, modify JBoss log4j config to suppress verbose CCM logging - - sed -iCCM '/^.*Limit the org.apache category to INFO as its DEBUG is verbose/i\ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ -' $LOG4J - sed -i '//a\ - ' $LOG4J -fi - -echo -n "To start APLAWS use: " -if (($APPSTK)); then - echo "service $JBOSSCONF start" -else - startup_script="$JBOSS_HOME/bin/$JBOSSCONF.sh" - echo "RUN_CONF=$JBOSS_HOME/bin/$JBOSSCONF.conf $JBOSS_HOME/bin/run.sh -c $JBOSSCONF" > "$startup_script" - echo "$startup_script" -fi - -# example cmdln with ccm start: -# -Dccm.home=/usr/share/ccm -Dccm.conf=/usr/share/ccm/conf/registry -Dcom.arsdigita.util.Assert.enabled=true -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Djavax.xml.transform.TransformerFactory=com.icl.saxon.TransformerFactoryImpl -Djava.protocol.handler.pkgs=com.arsdigita.util.protocol -Djava.ext.dirs=/opt/java/jdk/jre/lib/ext:/opt/java/jdk/lib/ext:/usr/share/ccm/webapps/WEB-INF/system -Dlog4j.configuration=file:///usr/share/ccm/conf/log4j.properties -Xms1024m -Xmx1024m -Dcom.sun.management.jmxremote - -# NOTE about resource: URL protocol -# JBoss has org.jboss.net.protocol.resource but it doesn't ignore -# leading slashes like c.a.util.protocol.resource does. -# Default parameter values are modified for JBoss handler on trunk r1346 -# so for JBoss webapps/WEB-INF/system/ccm-core-*-system.jar is not needed, -# JBoss handler takes precedence anyway -# XXX java.ext.dirs=...WEB-INF/system -# XXX java.protocol.handler.pkgs=com.arsdigita.util.protocol - diff --git a/ccm-core/src/com/arsdigita/packaging/Load.java b/ccm-core/src/com/arsdigita/packaging/Load.java index f5be1c6a4..b167a5b8f 100755 --- a/ccm-core/src/com/arsdigita/packaging/Load.java +++ b/ccm-core/src/com/arsdigita/packaging/Load.java @@ -39,6 +39,7 @@ import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.ParameterContext; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; +import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; @@ -56,6 +57,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Properties; +import java.util.Scanner; import java.util.Set; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.OptionBuilder; @@ -100,6 +102,13 @@ class Load extends Command { static { logger.debug("Static initalizer starting..."); + OPTIONS.addOption + (OptionBuilder + .hasArg() + .withLongOpt("packagekeys-file") + .withArgName("FILE") + .withDescription("Use PACKAGE_KEYS from FILE instead of command line") + .create()); OPTIONS.addOption (OptionBuilder .hasArg(false) @@ -185,15 +194,32 @@ class Load extends Command { System.err.println(e.getMessage()); return false; } - + // fill with command line arguments which is a list of packages by their // package-keys to load. List packages = line.getArgList(); + + if (line.hasOption("packagekeys-file")) { + String file = line.getOptionValue("packagekeys-file"); + logger.debug("File with package keys: " + file ); + try { + Scanner sc = new Scanner(new File(file)); + while (sc.hasNext()) { + packages.add(sc.next()); + } + } catch (IOException e) { + System.err.println(e.getMessage()); + return false; + } + } + if (packages.isEmpty()) { usage(OPTIONS, System.err, "PACKAGE-KEYS"); return false; } - + + + if (line.hasOption("usage") || line.hasOption("help")) { usage(OPTIONS, System.out, "PACKAGE-KEYS"); return true; diff --git a/tools-ng/common/lib/postgresql-jdbc-8.2.506.jar b/tools-ng/common/lib/postgresql-jdbc-8.2.506.jar deleted file mode 100644 index 85d5d0818..000000000 Binary files a/tools-ng/common/lib/postgresql-jdbc-8.2.506.jar and /dev/null differ diff --git a/tools-ng/common/lib/postgresql-jdbc-8.4.701.jar b/tools-ng/common/lib/postgresql-jdbc-8.4.701.jar new file mode 100644 index 000000000..2d42624d3 Binary files /dev/null and b/tools-ng/common/lib/postgresql-jdbc-8.4.701.jar differ diff --git a/tools-ng/common/xsl/build-template.xsl b/tools-ng/common/xsl/build-template.xsl index a2bf9fc5c..8c0a1205e 100755 --- a/tools-ng/common/xsl/build-template.xsl +++ b/tools-ng/common/xsl/build-template.xsl @@ -1279,6 +1279,8 @@ + @@ -1288,11 +1290,29 @@ environment. --> - + + + + + + + + + + + + + + diff --git a/tools-ng/ecdc/scriptlib/build-ccm.xml b/tools-ng/ecdc/scriptlib/build-ccm.xml index 043533a7f..5025c403e 100644 --- a/tools-ng/ecdc/scriptlib/build-ccm.xml +++ b/tools-ng/ecdc/scriptlib/build-ccm.xml @@ -11,13 +11,13 @@ - + Loading bundle ${this.bundle.folder} into ${ccm.home} - + @@ -27,7 +27,7 @@ - + @@ -187,17 +187,23 @@ - + - + - +