maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject maven git commit: [MNG-5889] .mvn directory should be picked when using --file
Date Fri, 30 Dec 2016 21:58:58 GMT
Repository: maven
Updated Branches:
  refs/heads/master 65960ac18 -> 1a94cd4a7

[MNG-5889] .mvn directory should be picked when using --file

o Updated to restore quoting the path argument so that the script starts to work
  again when used in a "directory name with spaces and & special characters".


Branch: refs/heads/master
Commit: 1a94cd4a76cd528eb4b8f46b853f8d77d7d5352d
Parents: 65960ac
Author: Christian Schulte <>
Authored: Fri Dec 30 22:57:13 2016 +0100
Committer: Christian Schulte <>
Committed: Fri Dec 30 22:57:13 2016 +0100

 apache-maven/src/bin/mvn.cmd | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index 6271f17..80a4c0e 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -83,11 +83,11 @@ set MAVEN_CMD_LINE_ARGS=%*
 @REM Find the project basedir, i.e., the directory that contains the folder ".mvn".
 @REM Fallback to current working directory if not found.
 if not "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
-set EXEC_DIR=%CD%
+set "EXEC_DIR=%CD%"
+set "WDIR=%EXEC_DIR%"
 @REM Look for the --file switch and start the search for the .mvn directory from the specified
 @REM POM location, if supplied.
@@ -125,7 +125,7 @@ if not exist "%POM_DIR%" (
   echo Directory %POM_DIR% extracted from the -f/--file command-line argument %FILE_ARG%
does not exist >&2
   goto error
+set "WDIR=%POM_DIR%"
 goto findBaseDir
@@ -138,7 +138,7 @@ goto stripPomDir
 exit /b
-cd /d %WDIR%
+cd /d "%WDIR%"
 if exist "%WDIR%\.mvn" goto baseDirFound
 cd ..
@@ -152,7 +152,7 @@ cd /d "%EXEC_DIR%"
 goto endDetectBaseDir
-if "_%EXEC_DIR:~-1%"=="_\" set EXEC_DIR=%EXEC_DIR:~0,-1%
+if "_%EXEC_DIR:~-1%"=="_\" set "EXEC_DIR=%EXEC_DIR:~0,-1%"
 cd "%EXEC_DIR%"

View raw message