[ https://issues.apache.org/jira/browse/MNG-5889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14747150#comment-14747150 ]
Arnaud HERITIER commented on MNG-5889: -------------------------------------- Hi Daniel, It is clearly a bug/limitation of the current implementation and it is really annoying for exemple on CI servers where you can checkout the project in a subdirectory and launch the build with the path to the pom parameter. I was aware of this bug for few months but I forgot to report it. I described it to the team on IRC few days ago but I had sadly no feedback. Technically I don't yet know how to fix it. The problem is that it enforces at the .sh/.cmd script level to parte the command line options to find if the -f/--file option is defined. If it is the case we need to extract its value and compute the path of the module directory (AFAIR we can either pass to the option the module directory or the POM file). When the module directory is found we need to find the .mvn directory from this path and not from the local directory. For the shell .sh version I think I may succeed to propose a fix, but for the windows .cmd I'm less confident and I'm clearly against to have a different behaviour based on the OS > .mvn directory should be picked when using --file > ------------------------------------------------- > > Key: MNG-5889 > URL: https://issues.apache.org/jira/browse/MNG-5889 > Project: Maven > Issue Type: Improvement > Components: Bootstrap & Build > Affects Versions: 3.3.3 > Reporter: Daniel Spilker > > The {{.mvn}} directory is not picked up when using the {{--file}} switch to > build a project from outside of the multi-module root. > Example: > * the module root is {{/foo/bar}} > * {{.mvn}} is located at {{/foo/bar/.mvn}} > * current directory is {{/foo}} > * Maven is invoked with {{mvn --file bar/module/pom.xml}} > I would expect the {{.mvn}} directory detection to start at the directory of > the POM selected by {{--file}} and then go through the parent directories. -- This message was sent by Atlassian JIRA (v6.3.4#6332)