[ https://issues.apache.org/jira/browse/MNG-5858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17069606#comment-17069606 ]
Hudson commented on MNG-5858: ----------------------------- Build failed in Jenkins: Maven TLP » maven-studies » maven-metrics #4 See https://builds.apache.org/job/maven-box/job/maven-studies/job/maven-metrics/4/ > 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 > Assignee: Jason van Zyl > Priority: Major > Fix For: 3.3.9 > > > 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 (v8.3.4#803005)