You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ag...@apache.org on 2015/05/02 19:34:03 UTC

maven git commit: MNG-5796 fix mvn.cmd execution when invoked at drive root

Repository: maven
Updated Branches:
  refs/heads/master 4567c8319 -> f27c348bb


MNG-5796 fix mvn.cmd execution when invoked at drive root


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

Branch: refs/heads/master
Commit: f27c348bbaf51046029ce2853feeaf98700f1aca
Parents: 4567c83
Author: Andreas Gudian <ag...@apache.org>
Authored: Sat May 2 19:33:38 2015 +0200
Committer: Andreas Gudian <ag...@apache.org>
Committed: Sat May 2 19:33:38 2015 +0200

----------------------------------------------------------------------
 apache-maven/src/bin/mvn.cmd | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/f27c348b/apache-maven/src/bin/mvn.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index 4fad093..d35c1d2 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -121,7 +121,7 @@ IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
 set EXEC_DIR=%CD%
 set WDIR=%EXEC_DIR%
 :findBaseDir
-IF EXIST "%WDIR%"\.mvn goto baseDirFound
+IF EXIST "%WDIR%\.mvn" goto baseDirFound
 cd ..
 IF "%WDIR%"=="%CD%" goto baseDirNotFound
 set WDIR=%CD%
@@ -133,6 +133,8 @@ cd "%EXEC_DIR%"
 goto endDetectBaseDir
 
 :baseDirNotFound
+if "_%EXEC_DIR:~-1%"=="_\" set EXEC_DIR=%EXEC_DIR:~0,-1%
+
 set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
 cd "%EXEC_DIR%"
 


Re: maven git commit: MNG-5796 fix mvn.cmd execution when invoked at drive root

Posted by Jason van Zyl <ja...@takari.io>.
Awesome, thanks.
On May 2, 2015, at 1:34 PM, agudian@apache.org wrote:

> Repository: maven
> Updated Branches:
>  refs/heads/master 4567c8319 -> f27c348bb
> 
> 
> MNG-5796 fix mvn.cmd execution when invoked at drive root
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/maven/repo
> Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/f27c348b
> Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/f27c348b
> Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/f27c348b
> 
> Branch: refs/heads/master
> Commit: f27c348bbaf51046029ce2853feeaf98700f1aca
> Parents: 4567c83
> Author: Andreas Gudian <ag...@apache.org>
> Authored: Sat May 2 19:33:38 2015 +0200
> Committer: Andreas Gudian <ag...@apache.org>
> Committed: Sat May 2 19:33:38 2015 +0200
> 
> ----------------------------------------------------------------------
> apache-maven/src/bin/mvn.cmd | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/maven/blob/f27c348b/apache-maven/src/bin/mvn.cmd
> ----------------------------------------------------------------------
> diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
> index 4fad093..d35c1d2 100644
> --- a/apache-maven/src/bin/mvn.cmd
> +++ b/apache-maven/src/bin/mvn.cmd
> @@ -121,7 +121,7 @@ IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
> set EXEC_DIR=%CD%
> set WDIR=%EXEC_DIR%
> :findBaseDir
> -IF EXIST "%WDIR%"\.mvn goto baseDirFound
> +IF EXIST "%WDIR%\.mvn" goto baseDirFound
> cd ..
> IF "%WDIR%"=="%CD%" goto baseDirNotFound
> set WDIR=%CD%
> @@ -133,6 +133,8 @@ cd "%EXEC_DIR%"
> goto endDetectBaseDir
> 
> :baseDirNotFound
> +if "_%EXEC_DIR:~-1%"=="_\" set EXEC_DIR=%EXEC_DIR:~0,-1%
> +
> set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
> cd "%EXEC_DIR%"
> 
> 

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder, Takari and Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
---------------------------------------------------------

A language that doesn’t affect the way you think about programming is not worth knowing. 
 
 -- Alan Perlis













---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org