Skip to content

Commit

Permalink
[MNG-7193] Introduce MAVEN_ARGS environment variable
Browse files Browse the repository at this point in the history
Add args directly after the class name and leave users the option to override
with maven.config or CLI args.

This closes #637
  • Loading branch information
michael-o committed Dec 21, 2021
1 parent e6287b4 commit fb32dcd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions apache-maven/src/assembly/shared/run
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ exec "$JAVACMD" \
"-Dlibrary.jansi.path=${MAVEN_HOME}/lib/jansi-native" \
"-Dmaven.multiModuleProjectDirectory=$MAVEN_PROJECTBASEDIR" \
$LAUNCHER_CLASS \
$MAVEN_ARGS \
"$@"
1 change: 1 addition & 0 deletions apache-maven/src/assembly/shared/run.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"-Dlibrary.jansi.path=%MAVEN_HOME%\lib\jansi-native" ^
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
%LAUNCHER_CLASS% ^
%MAVEN_ARGS% ^
%*
if ERRORLEVEL 1 goto error
goto end
Expand Down
1 change: 1 addition & 0 deletions apache-maven/src/assembly/shared/validate
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#
# JAVA_HOME (Optional) Points to a Java installation.
# MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
# MAVEN_ARGS (Optional) Arguments passed to Maven before CLI arguments.
# MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files.
# -----------------------------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions apache-maven/src/assembly/shared/validate.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
@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_OPTS (Optional) Java runtime options used when Maven is executed.
@REM MAVEN_ARGS (Optional) Arguments passed to Maven before CLI arguments.
@REM MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files.
@REM -----------------------------------------------------------------------------

Expand Down

0 comments on commit fb32dcd

Please sign in to comment.