maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From schu...@apache.org
Subject maven git commit: [MNG-5607] Don't use M2_HOME anymore in mvn shell/batch file anymore
Date Wed, 27 Jan 2016 04:47:29 GMT
Repository: maven
Updated Branches:
  refs/heads/master 364df3233 -> d3b4fb0c1


[MNG-5607] Don't use M2_HOME anymore in mvn shell/batch file anymore

o Updated to rename M2_HOME to MVN_HOME.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/d3b4fb0c
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/d3b4fb0c
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/d3b4fb0c

Branch: refs/heads/master
Commit: d3b4fb0c1e525bb1122c7e832279f1ef6fbd6efe
Parents: 364df32
Author: Christian Schulte <schulte@apache.org>
Authored: Wed Jan 27 05:46:49 2016 +0100
Committer: Christian Schulte <schulte@apache.org>
Committed: Wed Jan 27 05:46:49 2016 +0100

----------------------------------------------------------------------
 apache-maven/src/bin/mvn     | 24 ++++++++++++------------
 apache-maven/src/bin/mvn.cmd | 14 +++++++-------
 2 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/d3b4fb0c/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index c878735..7a636cd 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -109,18 +109,18 @@ done
 
 saveddir=`pwd`
 
-M2_HOME=`dirname "$PRG"`/..
+MVN_HOME=`dirname "$PRG"`/..
 
 # make it fully qualified
-M2_HOME=`cd "$M2_HOME" && pwd`
+MVN_HOME=`cd "$MVN_HOME" && pwd`
 
 cd "$saveddir"
-# echo Using m2 at $M2_HOME
+# echo Using mvn at $MVN_HOME
 
 # For Cygwin, ensure paths are in UNIX format before anything is touched
 if $cygwin ; then
-  [ -n "$M2_HOME" ] &&
-    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$MVN_HOME" ] &&
+    MVN_HOME=`cygpath --unix "$MVN_HOME"`
   [ -n "$JAVA_HOME" ] &&
     JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
   [ -n "$CLASSPATH" ] &&
@@ -129,8 +129,8 @@ fi
 
 # For Migwn, ensure paths are in UNIX format before anything is touched
 if $mingw ; then
-  [ -n "$M2_HOME" ] &&
-    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$MVN_HOME" ] &&
+    MVN_HOME="`(cd "$MVN_HOME"; pwd)`"
   [ -n "$JAVA_HOME" ] &&
     JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
   # TODO classpath?
@@ -180,12 +180,12 @@ if [ -z "$JAVA_HOME" ] ; then
 fi
 
 CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
-CLASSWORLDS_JAR=`echo "${M2_HOME}"/boot/plexus-classworlds-*.jar`
+CLASSWORLDS_JAR=`echo "${MVN_HOME}"/boot/plexus-classworlds-*.jar`
 
 # For Cygwin, switch paths to Windows format before running java
 if $cygwin; then
-  [ -n "$M2_HOME" ] &&
-    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$MVN_HOME" ] &&
+    MVN_HOME=`cygpath --path --windows "$MVN_HOME"`
   [ -n "$JAVA_HOME" ] &&
     JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
   [ -n "$CLASSPATH" ] &&
@@ -239,6 +239,6 @@ exec "$JAVACMD" \
   $MAVEN_OPTS \
   $MAVEN_DEBUG_OPTS \
   -classpath "${CLASSWORLDS_JAR}" \
-  "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
-  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}"
\
+  "-Dclassworlds.conf=${MVN_HOME}/bin/m2.conf" \
+  "-Dmaven.home=${MVN_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}"
\
   ${CLASSWORLDS_LAUNCHER} "$@"

http://git-wip-us.apache.org/repos/asf/maven/blob/d3b4fb0c/apache-maven/src/bin/mvn.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index 7635bfd..51ca499 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -76,19 +76,19 @@ echo.
 goto error
 
 :chkMHome
-SET "M2_HOME=%~dp0.."
-if not "%M2_HOME%"=="" goto valMHome
+SET "MVN_HOME=%~dp0.."
+if not "%MVN_HOME%"=="" goto valMHome
 goto error
 
 :valMHome
 
 :stripMHome
-if not "_%M2_HOME:~-1%"=="_\" goto checkMCmd
-set "M2_HOME=%M2_HOME:~0,-1%"
+if not "_%MVN_HOME:~-1%"=="_\" goto checkMCmd
+set "MVN_HOME=%MVN_HOME:~0,-1%"
 goto stripMHome
 
 :checkMCmd
-if exist "%M2_HOME%\bin\mvn.cmd" goto init
+if exist "%MVN_HOME%\bin\mvn.cmd" goto init
 
 goto error
 @REM ==== END VALIDATION ====
@@ -136,11 +136,11 @@ for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config")
do s
 
 SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
 
-for %%i in ("%M2_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
+for %%i in ("%MVN_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
 
 set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
 
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %CLASSWORLDS_JAR%
"-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%"
%CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %CLASSWORLDS_JAR%
"-Dclassworlds.conf=%MVN_HOME%\bin\m2.conf" "-Dmaven.home=%MVN_HOME%" "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%"
%CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
 if ERRORLEVEL 1 goto error
 goto end
 


Mime
View raw message