[
https://issues.apache.org/jira/browse/MNG-5889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16727096#comment-16727096
]
Robert Patrick edited comment on MNG-5889 at 12/21/18 10:14 PM:
----------------------------------------------------------------
I see the issue now.
On Windows 10, the mvn --file command seems to work with the following
invocation styles:
* mvn --file /path/to/pom.xml ...
* mvn --file=/path/to/pom.xml ...
On Linux (e.g., in the official Docker container), the mvn --file command only
works for the following invocation style:
* mvn --file /path/to/pom.xml
>From running mvn {{--help}}, it's not clear to me that --arg=value is intended
>to be supported and I cannot seem to find the Maven doc that talks about the
>command line options. The reason for this difference has to do with Windows
>CMD scripting behavior--not an intentional effort to support the
>--file=/path/to/pom.xml syntax.
If the --file=/path/to/pom.xml syntax is supposed to be supported, the "mvn"
shell script will require more work to detect both the --file /path/to/pom.xml
and --file=/path/to/pom.xml usages.
NOTE: To my knowledge, there is no way to change the Windows behavior of
supporting both arguments styles for arguments processed in the shell script
(most Maven arguments are processed in Java).
was (Author: rhpatrick00):
I see the issue now.
On Windows 10, the mvn --file command seems to work with the following
invocation styles:
* mvn --file /path/to/pom.xml ...
* mvn --file=/path/to/pom.xml ...
On Linux (e.g., in the official Docker container), the mvn --file command only
works for the following invocation style:
* mvn --file /path/to/pom.xml
>From running mvn {{--help}}, it's not clear to me that --arg=value is intended
>to be supported and I cannot seem to find the Maven doc that talks about the
>command line options. The reason for this difference has to do with Windows
>CMD scripting behavior--not an intentional effort to support the
>--file=/path/to/pom.xml syntax.
If the --file=/path/to/pom.xml syntax is supposed to be supported, the "mvn"
shell script will require more work to detect both the --file /path/to/pom.xml
and --file=/path/to/pom.xml usages.
> .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, 3.3.9
> Reporter: Daniel Spilker
> Assignee: Tibor Digana
> Priority: Major
> Fix For: 3.5.0-alpha-1, 3.5.0
>
> Attachments: reproduce_MNG-5889.bash
>
>
> 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
(v7.6.3#76005)