mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

kenneth_suter
26.53.2007 6c3365faf93a30ff62f05e4d2a72c8a1235c4e60
changed classpath so that only jars from either the install root or staging directory are present in order to prevent the potential for classes from different builds from being loaded; cleaned up script file
1 files modified
22 ■■■■ changed files
opends/resource/upgrade 22 ●●●● patch | view | raw | blame | history
opends/resource/upgrade
@@ -32,9 +32,9 @@
then
  if test -z "${JAVA_HOME}"
  then
    if test -f "${INSTANCE_ROOT}/lib/set-java-home"
    if test -f "${INSTANCE_ROOT}/bin/set-java-home"
    then
      . "${INSTANCE_ROOT}/lib/set-java-home"
      . "${INSTANCE_ROOT}/bin/set-java-home"
      JAVA_BIN="${JAVA_HOME}/bin/java"
      JAVAWS_BIN="${JAVA_HOME}/bin/javaws"
      export JAVA_BIN
@@ -47,7 +47,7 @@
        export JAVA_BIN
        export JAVAWS_BIN
      else
        echo "Please set JAVA_HOME to the root of a Java 5 (or later) installation."
        echo "Please set JAVA_HOME to the root of a Java 5.0 installation."
        exit 1
      fi
    fi
@@ -111,7 +111,7 @@
    if test ${?} -ne 0
    then
      echo "ERROR:  The detected Java version could not be used.  Please set "
      echo "        JAVA_HOME to the root of a Java 5 (or later) installation."
      echo "        JAVA_HOME to the root of a Java 5.0 installation."
      exit 1
    fi
  fi
@@ -120,7 +120,7 @@
  if test ${?} -ne 0
  then
    echo "ERROR:  The detected Java version could not be used.  Please set "
    echo "        JAVA_HOME to the root of a Java 5 (or later) installation."
    echo "        JAVA_HOME to the root of a Java 5.0 installation."
    exit 1
  fi
fi
@@ -134,7 +134,7 @@
# Configure the appropriate CLASSPATH.
# BuildExtractor uses the existing install's
# jars
CLASSPATH=${CLASSPATH}:${INSTANCE_ROOT}/classes
CLASSPATH=${INSTANCE_ROOT}/classes
for JAR in ${INSTANCE_ROOT}/lib/*.jar
do
  CLASSPATH=${CLASSPATH}:${JAR}
@@ -150,6 +150,7 @@
    # Configure the appropriate CLASSPATH.
    # Unlike BuildExtractor, the Upgrader uses
    # the newly extracted build's jars.
    CLASSPATH=${INSTANCE_ROOT}/tmp/upgrade/classes
    for JAR in ${INSTANCE_ROOT}/tmp/upgrade/lib/*.jar
    do
      CLASSPATH=${JAR}:${CLASSPATH}
@@ -163,11 +164,12 @@
      rm -fr "./tmp/upgrade"
    fi
  else
    # URL FOR TESTING ONLY
    # JAVAWS_VM_ARGS="-Dorg.opends.quicksetup.upgrader.Root=$INSTANCE_ROOT -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
    JAVAWS_VM_ARGS="-Dorg.opends.quicksetup.upgrader.Root=$INSTANCE_ROOT"
    export JAVAWS_VM_ARGS
    "${JAVAWS_BIN}" "http://localhost:8080/install/QuickUpgrade.jnlp"
    echo "Started Java Web Start upgrade"
    if test -z "${OPENDS_UPGRADE_JNLP}"
    then
      OPENDS_UPGRADE_JNLP=http://builds.opends.org/install/QuickUpgrade.jnlp
    fi
    "${JAVAWS_BIN}" "${OPENDS_UPGRADE_JNLP}"
  fi
fi