[ 
https://issues.apache.org/jira/browse/MNG-5889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16726990#comment-16726990
 ] 

Robert Patrick commented on MNG-5889:
-------------------------------------

The code to resolve properly locating the .mvn directory is definitely in 3.5.x 
and 3.6.0 (I just verified by looking at the shell scripts).  If you believe it 
isn't working with the --file option, try putting some garbage argument that 
the JVM doesn't recognize in root/.mvn/maven.config and run mvn 
--file=/path/to/root/pom.xml and see what happens.  I would expect the JVM to 
fail to start if this issue is resolved.  For example, I added the -Y option 
and mvn fails to start:

 
{quote}
D:\projects>type weblogic-deploy-tooling\.mvn\maven.config
-Dunit-test-wlst-dir=/u01/oracle/oracle_common/common/bin
-Y

D:\projects>mvn -v
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 
2018-10-24T13:41:47-05:00)
Maven home: c:\java\apache-maven-3.6.0\bin\..
Java version: 1.8.0_191, vendor: Oracle Corporation, runtime: 
c:\java\jdk1.8.0\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

D:\projects>mvn --file=weblogic-deploy-tooling\pom.xml
Unable to parse maven.config: Unrecognized option: -Y

usage: mvn [options] [<goal(s)>] [<phase(s)>]
<snip>
{quote}


> .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 &amp; 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
>
>
> 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)

Reply via email to