[MNG-5813] pass debug-opts from mvnDebug to mvn script in the additional env-variable MAVEN_DEBUG_OPTS to not interfere with user-specified MAVEN_OPTS (e.g. when read from .mavenrc).

Fixed as suggested by Robert Patrick on the ML
This commit is contained in:
Andreas Gudian 2015-06-27 17:41:33 +02:00
parent ad905af669
commit f104ef8850
2 changed files with 2 additions and 1 deletions

View File

@ -235,6 +235,7 @@ export MAVEN_CMD_LINE_ARGS
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}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \

View File

@ -38,4 +38,4 @@ MAVEN_DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,addre
echo Preparing to Execute Maven in Debug Mode
env MAVEN_OPTS="$MAVEN_OPTS $MAVEN_DEBUG_OPTS" $(dirname $0)/mvn "$@"
env MAVEN_OPTS="$MAVEN_OPTS" MAVEN_DEBUG_OPTS="$MAVEN_DEBUG_OPTS" $(dirname $0)/mvn "$@"