Repository: maven Updated Branches: refs/heads/DEPMGMT-IMPORT-IT b4c684f27 -> 0c23b37e8 (forced update)
[MNG-5962] mvn.cmd fails when the current directory has spaces in between Project: http://git-wip-us.apache.org/repos/asf/maven/repo Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/842b07be Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/842b07be Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/842b07be Branch: refs/heads/DEPMGMT-IMPORT-IT Commit: 842b07be97fdb7d4f36e167f596eb185f9601169 Parents: 1351020 Author: Miriam Lee <mimibaari+...@gmail.com> Authored: Thu Jan 14 13:56:36 2016 +0100 Committer: Michael Osipov <micha...@apache.org> Committed: Mon Jan 30 13:12:57 2017 +0100 ---------------------------------------------------------------------- apache-maven/src/bin/mvn.cmd | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven/blob/842b07be/apache-maven/src/bin/mvn.cmd ---------------------------------------------------------------------- diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd index 2321b9c..467269a 100644 --- a/apache-maven/src/bin/mvn.cmd +++ b/apache-maven/src/bin/mvn.cmd @@ -97,29 +97,30 @@ set MAVEN_CMD_LINE_ARGS=%* set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% if not "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% +set "EXEC_DIR=%CD%" +set "WDIR=%EXEC_DIR%" + :findBaseDir if exist "%WDIR%\.mvn" goto baseDirFound cd .. IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% +set "WDIR=%CD%" goto findBaseDir :baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% +set "MAVEN_PROJECTBASEDIR=%WDIR%" cd "%EXEC_DIR%" goto endDetectBaseDir :baseDirNotFound if "_%EXEC_DIR:~-1%"=="_\" set EXEC_DIR=%EXEC_DIR:~0,-1% - -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +set "MAVEN_PROJECTBASEDIR=%EXEC_DIR%" cd "%EXEC_DIR%" :endDetectBaseDir -if not exist "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig +set "jvmConfig=\.mvn\jvm.config" +if not exist "%MAVEN_PROJECTBASEDIR%%jvmConfig%" goto endReadAdditionalConfig @setlocal EnableExtensions EnableDelayedExpansion for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a