PR: MNG-372

Submitted by: Mark Hobson
Reviewed by:  Brett Porter
deal better with spaces in paths on windows
(applied with modifications)

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@169184 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-05-08 22:50:01 +00:00
parent d6eed0b7a6
commit 0a7842482f
5 changed files with 13 additions and 9 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh
# Check to make sure JAVA_HOME is set
[ -z $JAVA_HOME ] && echo && echo 'You must set $JAVA_HOME to use mboot!' && echo && exit 1
[ -z "$JAVA_HOME" ] && echo && echo 'You must set $JAVA_HOME to use mboot!' && echo && exit 1
JAVACMD=$JAVA_HOME/bin/java
@ -19,7 +19,11 @@ if $cygwin ; then
fi
if [ ! -z "$M2_HOME" ]; then
ARGS="$ARGS -Dmaven.home=$M2_HOME"
if [ -n "$ARGS" ]; then
ARGS="$ARGS -Dmaven.home=$M2_HOME"
else
ARGS="-Dmaven.home=$M2_HOME"
fi
fi
# Build and install mboot
@ -39,7 +43,7 @@ ret=$?; if [ $ret != 0 ]; then exit $ret; fi
echo " Building maven2 components ... "
echo "-----------------------------------------------------------------------"
$JAVACMD $ARGS $MAVEN_OPTS -jar mboot.jar
"$JAVACMD" "$ARGS" $MAVEN_OPTS -jar mboot.jar
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
)
ret=$?; if [ $ret != 0 ]; then exit $ret; fi

View File

@ -26,8 +26,8 @@ if $cygwin ; then
fi
if [ ! -z "$M2_HOME" ]; then
jvm_args="$jvm_args -Dmaven.home=$M2_HOME"
jvm_m2_home="-Dmaven.home=$M2_HOME"
fi
java $jvm_args -cp "$cp" $verifier
java "$jvm_m2_home" $jvm_args -cp "$cp" $verifier

View File

@ -126,7 +126,7 @@ if $cygwin; then
HOME=`cygpath --path --windows "$HOME"`
fi
exec $JAVACMD \
exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "${M2_HOME}"/core/boot/classworlds-*.jar \
"-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \

View File

@ -127,7 +127,7 @@ if "%MAVEN_OPTS%"=="" SET MAVEN_OPTS="-Xmx256m"
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
@REM Start MAVEN2
%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %M2_HOME%\core\boot\classworlds-*.jar "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" org.codehaus.classworlds.Launcher %MAVEN_CMD_LINE_ARGS%
%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath "%M2_HOME%"\core\boot\classworlds-* "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" org.codehaus.classworlds.Launcher %MAVEN_CMD_LINE_ARGS%
goto end
:error

View File

@ -9,8 +9,8 @@ rm -rf ${buildDir} > /dev/null 2>&1
mkdir -p ${classesDir}
#javac -d ${classesDir} ${srcDir}/*.java
$JAVA_HOME/bin/javac -g -d ${classesDir} `find ${srcDir} -name '*.java'`
"$JAVA_HOME/bin/javac" -g -d ${classesDir} `find ${srcDir} -name '*.java'`
( cd ${classesDir} ; $JAVA_HOME/bin/jar -cfm ../mboot.jar ../../manifest.txt * )
( cd ${classesDir} ; "$JAVA_HOME/bin/jar" -cfm ../mboot.jar ../../manifest.txt * )
cp ${buildDir}/mboot.jar ..