diff --git a/spring-bootstrap-cli/src/main/scripts/spring b/spring-bootstrap-cli/src/main/scripts/spring index 2b4095dee6..28120e8a56 100755 --- a/spring-bootstrap-cli/src/main/scripts/spring +++ b/spring-bootstrap-cli/src/main/scripts/spring @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -x # OS specific support (must be 'true' or 'false'). cygwin=false; @@ -49,6 +49,7 @@ fi if [ "$SPRING_HOME" == "" ]; then SPRING_HOME=`cd "$(dirname $0)"/.. && pwd` fi +SPRING_HOME=`cd "${SPRING_HOME}" && pwd` SPRING_BIN=$(dirname $0) TARGETDIR=target/classes @@ -59,12 +60,16 @@ mkdir -p "${TARGETDIR%/}" CLASSPATH="${CLASSPATH}":"${SPRING_BIN}":"${TARGETDIR}" +if [ ! "${SPRING_BIN}" == "${SPRING_HOME}" ]; then + CLASSPATH="${CLASSPATH}":"${SPRING_HOME}"/classes +fi + for f in "${SPRING_HOME}"/lib/*.jar; do - CLASSPATH="${CLASSPATH}":$f + [ -f $f ] && CLASSPATH="${CLASSPATH}":$f done for f in "${SPRING_HOME}"/*.jar; do - CLASSPATH="${CLASSPATH}":$f + [ -f $f ] && CLASSPATH="${CLASSPATH}":$f done if $cygwin; then