mirror of https://github.com/apache/maven.git
[MNG-3867] Support MAVEN_OPTS in mvnDebug script
o Merged from r728940 git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@728945 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f39ec410da
commit
c4e05f0830
|
@ -33,7 +33,7 @@
|
||||||
# set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
# set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
INT_MAVEN_OPTS="$MAVEN_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
|
MAVEN_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
|
||||||
|
|
||||||
echo Preparing to Execute Maven in Debug Mode
|
echo Preparing to Execute Maven in Debug Mode
|
||||||
|
|
||||||
|
@ -159,7 +159,8 @@ if $cygwin; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec "$JAVACMD" \
|
exec "$JAVACMD" \
|
||||||
$INT_MAVEN_OPTS \
|
$MAVEN_OPTS \
|
||||||
|
$MAVEN_DEBUG_OPTS \
|
||||||
-classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
|
-classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
|
||||||
"-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
|
"-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
|
||||||
"-Dmaven.home=${M2_HOME}" \
|
"-Dmaven.home=${M2_HOME}" \
|
||||||
|
|
|
@ -32,14 +32,14 @@
|
||||||
@REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
@REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
@REM ----------------------------------------------------------------------------
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
set INT_MAVEN_OPTS=%MAVEN_OPTS% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
|
||||||
@echo Preparing to Execute Maven in Debug Mode
|
|
||||||
|
|
||||||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||||
@echo off
|
@echo off
|
||||||
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
|
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
|
||||||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||||
|
|
||||||
|
set MAVEN_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
@echo Preparing to Execute Maven in Debug Mode
|
||||||
|
|
||||||
@REM set %HOME% to equivalent of $HOME
|
@REM set %HOME% to equivalent of $HOME
|
||||||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||||
|
|
||||||
|
@ -157,8 +157,7 @@ goto runm2
|
||||||
|
|
||||||
@REM Start MAVEN2
|
@REM Start MAVEN2
|
||||||
:runm2
|
:runm2
|
||||||
|
%MAVEN_JAVA_EXE% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" org.codehaus.classworlds.Launcher %MAVEN_CMD_LINE_ARGS%
|
||||||
%MAVEN_JAVA_EXE% %INT_MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" org.codehaus.classworlds.Launcher %MAVEN_CMD_LINE_ARGS%
|
|
||||||
if ERRORLEVEL 1 goto error
|
if ERRORLEVEL 1 goto error
|
||||||
goto end
|
goto end
|
||||||
|
|
||||||
|
@ -190,4 +189,3 @@ if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
|
||||||
|
|
||||||
exit /B %ERROR_CODE%
|
exit /B %ERROR_CODE%
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue