mirror of https://github.com/apache/maven.git
[MNG-7193] Introduce MAVEN_ARGS environment variable
Add args directly after the class name and leave users the option to override with maven.config or CLI args. This closes #782
This commit is contained in:
parent
73360100ca
commit
29c53d6748
|
@ -23,6 +23,7 @@
|
||||||
# Environment Variable Prerequisites
|
# Environment Variable Prerequisites
|
||||||
#
|
#
|
||||||
# JAVA_HOME Must point at your Java Development Kit installation.
|
# JAVA_HOME Must point at your Java Development Kit installation.
|
||||||
|
# MAVEN_ARGS (Optional) Arguments passed to Maven before CLI arguments.
|
||||||
# MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
|
# MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
|
||||||
# MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files.
|
# MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files.
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
@ -199,4 +200,4 @@ exec "$JAVACMD" \
|
||||||
"-Dmaven.home=${MAVEN_HOME}" \
|
"-Dmaven.home=${MAVEN_HOME}" \
|
||||||
"-Dlibrary.jansi.path=${MAVEN_HOME}/lib/jansi-native" \
|
"-Dlibrary.jansi.path=${MAVEN_HOME}/lib/jansi-native" \
|
||||||
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||||
${CLASSWORLDS_LAUNCHER} "$@"
|
${CLASSWORLDS_LAUNCHER} ${MAVEN_ARGS} "$@"
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
@REM Environment Variable Prerequisites
|
@REM Environment Variable Prerequisites
|
||||||
@REM
|
@REM
|
||||||
@REM JAVA_HOME Must point at your Java Development Kit installation.
|
@REM JAVA_HOME Must point at your Java Development Kit installation.
|
||||||
|
@REM MAVEN_ARGS (Optional) Arguments passed to Maven before CLI arguments.
|
||||||
@REM MAVEN_BATCH_ECHO (Optional) Set to 'on' to enable the echoing of the batch commands.
|
@REM MAVEN_BATCH_ECHO (Optional) Set to 'on' to enable the echoing of the batch commands.
|
||||||
@REM MAVEN_BATCH_PAUSE (Optional) set to 'on' to wait for a key stroke before ending.
|
@REM MAVEN_BATCH_PAUSE (Optional) set to 'on' to wait for a key stroke before ending.
|
||||||
@REM MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
|
@REM MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
|
||||||
|
@ -176,7 +177,7 @@ set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||||
"-Dmaven.home=%MAVEN_HOME%" ^
|
"-Dmaven.home=%MAVEN_HOME%" ^
|
||||||
"-Dlibrary.jansi.path=%MAVEN_HOME%\lib\jansi-native" ^
|
"-Dlibrary.jansi.path=%MAVEN_HOME%\lib\jansi-native" ^
|
||||||
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
|
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
|
||||||
%CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
|
%CLASSWORLDS_LAUNCHER% %MAVEN_ARGS% %MAVEN_CMD_LINE_ARGS%
|
||||||
if ERRORLEVEL 1 goto error
|
if ERRORLEVEL 1 goto error
|
||||||
goto end
|
goto end
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
# Environment Variable Prerequisites
|
# Environment Variable Prerequisites
|
||||||
#
|
#
|
||||||
# JAVA_HOME Must point at your Java Development Kit installation.
|
# JAVA_HOME Must point at your Java Development Kit installation.
|
||||||
|
# MAVEN_ARGS (Optional) Arguments passed to Maven before CLI arguments.
|
||||||
# MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
|
# MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
|
||||||
# MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files.
|
# MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files.
|
||||||
# MAVEN_DEBUG_ADDRESS (Optional) Set the debug address. Default value is 8000
|
# MAVEN_DEBUG_ADDRESS (Optional) Set the debug address. Default value is 8000
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
@REM Environment Variable Prerequisites
|
@REM Environment Variable Prerequisites
|
||||||
@REM
|
@REM
|
||||||
@REM JAVA_HOME Must point at your Java Development Kit installation.
|
@REM JAVA_HOME Must point at your Java Development Kit installation.
|
||||||
|
@REM MAVEN_ARGS (Optional) Arguments passed to Maven before CLI arguments.
|
||||||
@REM MAVEN_BATCH_ECHO (Optional) Set to 'on' to enable the echoing of the batch commands.
|
@REM MAVEN_BATCH_ECHO (Optional) Set to 'on' to enable the echoing of the batch commands.
|
||||||
@REM MAVEN_BATCH_PAUSE (Optional) set to 'on' to wait for a key stroke before ending.
|
@REM MAVEN_BATCH_PAUSE (Optional) set to 'on' to wait for a key stroke before ending.
|
||||||
@REM MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
|
@REM MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
# Environment Variable Prerequisites
|
# Environment Variable Prerequisites
|
||||||
#
|
#
|
||||||
# JAVA_HOME Must point at your Java Development Kit installation.
|
# JAVA_HOME Must point at your Java Development Kit installation.
|
||||||
|
# MAVEN_ARGS (Optional) Arguments passed to Maven before CLI arguments.
|
||||||
# MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
|
# MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
|
||||||
# MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files.
|
# MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files.
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue