Consider the following sequence of commands, executed using the attached dummy-project.zip:
As you can see, the maven.multiModuleProjectDirectory variable is set to /tmp/dummy, even though the project is executed from within /tmp/dummy/project, which itself also contains a .mvn directory.
MNG-5767 and the comments in the relevant change, I suspect this is a bug. The find_maven_basedir function should test for the presence of .mvn before traversing to the current working directory's parent directory.
- I didn't check whether this issue affects mvn.cmd, as I'm not familiar with Windows shell scripts and do not have a Windows machine at my disposal.
- The patch does not simply move the wdir assignment below the if-statement, because that would break the case in which there is a sole .mvn in the file system root. (That'd be weird, yes, but allowed.)