[ https://issues.apache.org/jira/browse/MNG-5889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15639828#comment-15639828 ]
ASF GitHub Bot commented on MNG-5889: ------------------------------------- Github user rpatrick00 commented on a diff in the pull request: https://github.com/apache/maven/pull/94#discussion_r86667117 --- Diff: apache-maven/src/bin/mvn.cmd --- @@ -86,19 +86,65 @@ set MAVEN_CMD_LINE_ARGS=%* set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% if not "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir -set "EXEC_DIR=%CD%" -set "WDIR=%EXEC_DIR%" +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% + +@REM Look for the --file switch and start the search for the .mvn directory from the specified +@REM POM location, if supplied. + +set FILE_ARG= +:arg_loop +if "%1" == "-f" ( + set "FILE_ARG=%2" + shift + goto process_file_arg +) +if "%1" == "--file" ( + set "FILE_ARG=%2" + shift + goto process_file_arg +) +@REM If none of the above, skip the argument +shift +if not "%~1" == "" ( + goto arg_loop +) else ( + goto findBaseDir +) + +:process_file_arg +if "%FILE_ARG%" == "" ( + goto findBaseDir +) +call :get_directory_from_file %FILE_ARG% +if not exist "%POM_DIR%" ( + echo Directory %POM_DIR% extracted from the -f/--file command-line argument does not exist --- End diff -- OK > .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 > Assignee: Tibor Digana > Fix For: 3.4.0 > > > 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)