Description
Steps to reproduce
$ mkdir apache
$ cd apache
$ git clone https://git-wip-us.apache.org/repos/asf/maven.git
$ mkdir .mvn
$ cd .mvn
$ echo -DskipTests > maven.config
$ cd ../maven
$ mvn install # notice tests are skipped
$ cd ../..
$ mvn install -f apache/maven/pom.xml # notice tests not skipped (bug)
$ cd apache
$ mvn install -f maven/pom.xml # notice tests are skipped (accident)
The issue is that we do not search for the .mvn folder from the directory specified from -f rather from the current working directory