diff --git a/apache-maven/src/assembly/shared/init b/apache-maven/src/assembly/shared/init index d5bd529b601c..5043c905ee31 100755 --- a/apache-maven/src/assembly/shared/init +++ b/apache-maven/src/assembly/shared/init @@ -34,11 +34,15 @@ find_maven_basedir() { ( basedir=`find_file_argument_basedir "$@"` wdir="$basedir" - while [ "$wdir" != '/' ] ; do + while : + do if [ -d "$wdir"/.mvn ] ; then basedir=$wdir break fi + if [ "$wdir" == '/' ] ; then + break + fi wdir=`cd "$wdir/.."; pwd` done echo "$basedir"