maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject maven git commit: [MNG-6223] support -f path/to/dir when detecting .mvn [Forced Update!]
Date Sat, 06 May 2017 21:46:28 GMT
Repository: maven
Updated Branches:
  refs/heads/MNG-6223 0eb934bc8 -> 3a2ccc3eb (forced update)


[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/3a2ccc3e
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/3a2ccc3e
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/3a2ccc3e

Branch: refs/heads/MNG-6223
Commit: 3a2ccc3eb8f863b06e963aba316b24a711c05f30
Parents: f7d4bce
Author: Hervé Boutemy <hboutemy@apache.org>
Authored: Sat May 6 18:15:42 2017 +0200
Committer: herve <herve@giga>
Committed: Sat May 6 23:46:10 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/3a2ccc3e/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/3a2ccc3e/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


Mime
View raw message