Github user Stephan202 commented on the pull request:

    https://github.com/apache/maven/pull/40#issuecomment-89738913
  
    I can't seem to comment on 
[MNG-5786](https://jira.codehaus.org/browse/MNG-5786) anymore (comment button 
missing), presumably because of the impending Codehaus shutdown. So I'll 
continue the discussion here.
    
    @jvanzyl wrote:
    > The intended use and behaviour is to have one `.mvn` at the root of the 
multi-module project. By design we currently do not expect there to be multiple 
`.mvn` directories within one project tree. So I consider this behaviour 
correct.
    
    I understand wanting to keep the system simple and supporting only a single 
`.mvn` within the project tree. But as it stands, a "rogue" `.mvn` higher up, 
"outside" the project tree can silently impact the build. This can lead to hard 
to explain issues further down the line. As such, I suggest Maven either:
    
    1. Warns if more than one `.mvn` is found in the path from CWD to root;
    2. Fixes the code such that the "nearest" `.mvn` in the path from CWD to 
root always wins.
    
    Option 2 is no more difficult to understand than "we support only one 
`.mvn`" (as one does not even need to think about error cases) and can be 
achieved with a trivial patch; that's precisely what this PR proposes.
    
    Side note: if we feel uncomfortable considering any `.mvn` that may be 
outside the project tree, then the search logic should be extended with an 
extra termination condition: stop looking for a `.mvn` once the traversal up 
the directory tree reaches a directory that lacks a `pom.xml`. 


---
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]

Reply via email to