diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn index fc61044e77..7e6394b842 100755 --- a/apache-maven/src/bin/mvn +++ b/apache-maven/src/bin/mvn @@ -33,14 +33,6 @@ # set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 # ---------------------------------------------------------------------------- -QUOTED_ARGS="" -while [ "$1" != "" ] ; do - - QUOTED_ARGS="$QUOTED_ARGS \"$1\"" - shift - -done - if [ -f /etc/mavenrc ] ; then . /etc/mavenrc fi @@ -154,11 +146,9 @@ if $cygwin; then HOME=`cygpath --path --windows "$HOME"` fi -maven_exec_cmd="\"$JAVACMD\" \ +exec "$JAVACMD" \ $MAVEN_OPTS \ - -classpath \"${M2_HOME}\"/boot/plexus-classworlds-*.jar \ - \"-Dclassworlds.conf=${M2_HOME}/bin/m2.conf\" \ - \"-Dmaven.home=${M2_HOME}\" \ - ${CLASSWORLDS_LAUNCHER}" - -eval $maven_exec_cmd "$QUOTED_ARGS" + -classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \ + "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \ + "-Dmaven.home=${M2_HOME}" \ + ${CLASSWORLDS_LAUNCHER} "$@" diff --git a/apache-maven/src/bin/mvnDebug b/apache-maven/src/bin/mvnDebug index f72898e512..da8441c6e2 100755 --- a/apache-maven/src/bin/mvnDebug +++ b/apache-maven/src/bin/mvnDebug @@ -37,14 +37,6 @@ MAVEN_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_ echo Preparing to Execute Maven in Debug Mode -QUOTED_ARGS="" -while [ "$1" != "" ] ; do - - QUOTED_ARGS="$QUOTED_ARGS \"$1\"" - shift - -done - if [ -f /etc/mavenrc ] ; then . /etc/mavenrc fi @@ -158,12 +150,10 @@ if $cygwin; then HOME=`cygpath --path --windows "$HOME"` fi -maven_exec_cmd="\"$JAVACMD\" \ +exec "$JAVACMD" \ $MAVEN_OPTS \ $MAVEN_DEBUG_OPTS \ - -classpath \"${M2_HOME}\"/boot/plexus-classworlds-*.jar \ - \"-Dclassworlds.conf=${M2_HOME}/bin/m2.conf\" \ - \"-Dmaven.home=${M2_HOME}\" \ - ${CLASSWORLDS_LAUNCHER}" - -eval $maven_exec_cmd "$QUOTED_ARGS" + -classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \ + "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \ + "-Dmaven.home=${M2_HOME}" \ + ${CLASSWORLDS_LAUNCHER} "$@"