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
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]