Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C3198200C69 for ; Sat, 6 May 2017 23:46:30 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C1A0F160BAD; Sat, 6 May 2017 21:46:30 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 14789160B9F for ; Sat, 6 May 2017 23:46:29 +0200 (CEST) Received: (qmail 71968 invoked by uid 500); 6 May 2017 21:46:28 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 71959 invoked by uid 99); 6 May 2017 21:46:28 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 May 2017 21:46:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B5197DFC2E; Sat, 6 May 2017 21:46:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: hboutemy@apache.org To: commits@maven.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: maven git commit: [MNG-6223] support -f path/to/dir when detecting .mvn [Forced Update!] Date: Sat, 6 May 2017 21:46:28 +0000 (UTC) archived-at: Sat, 06 May 2017 21:46:31 -0000 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 Authored: Sat May 6 18:15:42 2017 +0200 Committer: herve 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