This is an automated email from the ASF dual-hosted git repository.

henning pushed a commit to branch maven-3.8.x
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/maven-3.8.x by this push:
     new 25381b63e Backport MAVEN_ARGS support to 3.8.x (#781)
25381b63e is described below

commit 25381b63e934525b5ee1600bbdb05388918441bf
Author: Henning Schmiedehausen <henn...@schmiedehausen.org>
AuthorDate: Fri Jul 29 11:39:42 2022 -0700

    Backport MAVEN_ARGS support to 3.8.x (#781)
    
    https://maven.apache.org/configure.html shows the MAVEN_ARGS
    environment variable which is extremely useful for customizing build
    scripts and processes. Unfortunately, it is only support for (unreleased)
    Maven 4.
    
    This patch backports support to Maven 3.8.x in the hope that this
    support would arrive much sooner than with Maven 4.x.x
---
 apache-maven/src/bin/mvn          | 3 ++-
 apache-maven/src/bin/mvn.cmd      | 3 ++-
 apache-maven/src/bin/mvnDebug     | 1 +
 apache-maven/src/bin/mvnDebug.cmd | 1 +
 apache-maven/src/bin/mvnyjp       | 1 +
 5 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index dfa384b8e..a3004f917 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -23,6 +23,7 @@
 # Environment Variable Prerequisites
 #
 #   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_SKIP_RC   (Optional) Flag to disable loading of mavenrc files.
 # -----------------------------------------------------------------------------
@@ -199,4 +200,4 @@ exec "$JAVACMD" \
   "-Dmaven.home=${MAVEN_HOME}" \
   "-Dlibrary.jansi.path=${MAVEN_HOME}/lib/jansi-native" \
   "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
-  ${CLASSWORLDS_LAUNCHER} "$@"
+  ${CLASSWORLDS_LAUNCHER} ${MAVEN_ARGS} "$@"
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index 9fb4a98c7..b14b9c124 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -21,6 +21,7 @@
 @REM Environment Variable Prerequisites
 @REM
 @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_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.
@@ -176,7 +177,7 @@ set 
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
   "-Dmaven.home=%MAVEN_HOME%" ^
   "-Dlibrary.jansi.path=%MAVEN_HOME%\lib\jansi-native" ^
   "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
-  %CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
+  %CLASSWORLDS_LAUNCHER% %MAVEN_ARGS% %MAVEN_CMD_LINE_ARGS%
 if ERRORLEVEL 1 goto error
 goto end
 
diff --git a/apache-maven/src/bin/mvnDebug b/apache-maven/src/bin/mvnDebug
index 5f6095a98..2d7cafef9 100755
--- a/apache-maven/src/bin/mvnDebug
+++ b/apache-maven/src/bin/mvnDebug
@@ -23,6 +23,7 @@
 # Environment Variable Prerequisites
 #
 #   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_SKIP_RC       (Optional) Flag to disable loading of mavenrc files.
 #   MAVEN_DEBUG_ADDRESS (Optional) Set the debug address. Default value is 8000
diff --git a/apache-maven/src/bin/mvnDebug.cmd 
b/apache-maven/src/bin/mvnDebug.cmd
index 6a327ff55..9777cf952 100644
--- a/apache-maven/src/bin/mvnDebug.cmd
+++ b/apache-maven/src/bin/mvnDebug.cmd
@@ -21,6 +21,7 @@
 @REM Environment Variable Prerequisites
 @REM
 @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_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.
diff --git a/apache-maven/src/bin/mvnyjp b/apache-maven/src/bin/mvnyjp
index a35eabf1f..6e21a0ed2 100755
--- a/apache-maven/src/bin/mvnyjp
+++ b/apache-maven/src/bin/mvnyjp
@@ -23,6 +23,7 @@
 # Environment Variable Prerequisites
 #
 #   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_SKIP_RC   (Optional) Flag to disable loading of mavenrc files.
 # -----------------------------------------------------------------------------

Reply via email to