maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MNG-5858) mvn script fails to locate .mvn in current directory
Date Sat, 12 Sep 2015 01:37:45 GMT

    [ https://issues.apache.org/jira/browse/MNG-5858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14741841#comment-14741841
] 

Hudson commented on MNG-5858:
-----------------------------

SUCCESS: Integrated in maven-3.x #1114 (See [https://builds.apache.org/job/maven-3.x/1114/])
MNG-5858: mvn script fails to locate .mvn in current directory (jason: rev 1a8413bef94bd44fec6f5c6373f64c705e890908)
* apache-maven/src/bin/mvn


> mvn script fails to locate .mvn in current directory
> ----------------------------------------------------
>
>                 Key: MNG-5858
>                 URL: https://issues.apache.org/jira/browse/MNG-5858
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 3.3.3
>            Reporter: Dave Syer
>
> The while loop in the shell script where we look for the .mvn directory is wrong:
> {noformat}
> find_maven_basedir() {
>   local basedir=$(pwd)
>   local wdir=$(pwd)
>   while [ "$wdir" != '/' ] ; do
>     wdir=$(cd "$wdir/.."; pwd)
>     if [ -d "$wdir"/.mvn ] ; then
>       basedir=$wdir
>       break
>     fi
>   done
>   echo "${basedir}"
> }
> {noformat}
> Should be
> {noformat}
> find_maven_basedir() {
>   local basedir=$(pwd)
>   local wdir=$(pwd)
>   while [ "$wdir" != '/' ] ; do
>     if [ -d "$wdir"/.mvn ] ; then
>       basedir=$wdir
>       break
>     fi
>     wdir=$(cd "$wdir/.."; pwd)
>   done
>   echo "${basedir}"
> }
> {noformat}
> That way if the current directory contains .mvn the loop terminates immediately.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message