maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud Héritier <aherit...@gmail.com>
Subject Re: maven git commit: [MNG-5607] Don't use M2_HOME anymore in mvn shell/batch file anymore
Date Wed, 27 Jan 2016 10:02:47 GMT
-1
See https://issues.apache.org/jira/browse/MNG-5607
Ok to introduce MVN_HOME with M2_HOME value as default when defined (and
then remove M2_HOME in Maven 4)
But replacing M2_HOME by MVN_HOME in 3.4 seems to be a risky change for our
ecosystem (IDE, CI servers, ...) and not only for the local user environment

WDYT ?

Cheers



On Wed, Jan 27, 2016 at 5:47 AM, <schulte@apache.org> wrote:

> 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
>
>
>


-- 
-----
Arnaud Héritier
http://aheritier.net
Mail/GTalk: aheritier AT gmail DOT com
Twitter/Skype : aheritier

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message