From 10296a8036ee1564e4351cc60daa5c48e038018c Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Thu, 16 Jul 2015 12:07:00 +0100 Subject: [PATCH] Fix while loop so that basedir is detected in current dir There was a problem with the logic in the while loop that detects the base dir - it should first look in the current directory, otherwise you can't build in a directory with local settings because it will always climb up and find .mvn in a parent directory (e.g. user's home). --- maven-wrapper/mvnw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven-wrapper/mvnw b/maven-wrapper/mvnw index c67cd417c3..4daefb526f 100755 --- a/maven-wrapper/mvnw +++ b/maven-wrapper/mvnw @@ -200,11 +200,11 @@ 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 + wdir=$(cd "$wdir/.."; pwd) done echo "${basedir}" }