You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2017/05/12 19:49:17 UTC

[13/18] maven git commit: [MNG-6223] support -f path/to/dir when detecting .mvn

[MNG-6223] support -f path/to/dir when detecting .mvn

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

Branch: refs/heads/MNG-6169_2/not-updated-MJAR-MCOMPILER
Commit: 08d6cbfdeaeef1a87c051fd52e6db5c18fea5742
Parents: bf05ee1
Author: Hervé Boutemy <hb...@apache.org>
Authored: Sat May 6 18:15:42 2017 +0200
Committer: Michael Osipov <mi...@apache.org>
Committed: Fri May 12 21:46:09 2017 +0200

----------------------------------------------------------------------
 apache-maven/src/bin/mvn     | 4 +++-
 apache-maven/src/bin/mvn.cmd | 6 +++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/08d6cbfd/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 623b5f2..eedd344 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -141,7 +141,9 @@ find_file_argument_basedir() {
   found_file_switch=0
   for arg in "$@"; do
     if [ ${found_file_switch} -eq 1 ]; then
-      if [ -f "${arg}" ]; then
+      if [ -d "${arg}" ]; then
+        basedir=`cd "${arg}" && pwd -P`
+      elif [ -f "${arg}" ]; then
         basedir=`dirname "${arg}"`
         basedir=`cd "${basedir}" && pwd -P`
         if [ ! -d "${basedir}" ]; then

http://git-wip-us.apache.org/repos/asf/maven/blob/08d6cbfd/apache-maven/src/bin/mvn.cmd
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn.cmd b/apache-maven/src/bin/mvn.cmd
index 9d92279..bfcc1b5 100644
--- a/apache-maven/src/bin/mvn.cmd
+++ b/apache-maven/src/bin/mvn.cmd
@@ -120,7 +120,11 @@ if not exist "%FILE_ARG%" (
   echo POM file %FILE_ARG% specified the -f/--file command-line argument does not exist >&2
   goto error
 )
-call :get_directory_from_file "%FILE_ARG%"
+if exist "%FILE_ARG%\*" (
+  set "POM_DIR=%FILE_ARG%"
+) else (
+  call :get_directory_from_file "%FILE_ARG%"
+)
 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