There are cases where this would break. It’s not a pattern I see very often but 
when projects put their parent/aggregator pom in a directory of its own there 
is no pom.xml at the upper most level of the project.

I know that Fred got bitten by a .mvn/ directory way up near the root of the 
file system, did you run into a specific problem?

> On Oct 12, 2015, at 2:16 PM, Karl Heinz Marbaise <[email protected]> wrote:
> 
> Hi,
> 
> based on the changes we have made to identify the folder where ".mvn" is 
> located i would suggest to enhance the check with checking the pom.xml file 
> as well...So i would suggest to enhance the find_maven_basedir() function 
> like the following:
> 
>   local basedir="$(pwd)"
>   local wdir="$(pwd)"
>   while [ "$wdir" != '/' ] ; do
> -    if [ -d "$wdir"/.mvn ] ; then
> +    if [ -d "$wdir"/.mvn ] && [ -e "$wdir"/pom.xml ] ; then
>       basedir=$wdir
>       break
>     fi
> 
> WDYT ?
> 
> See also my comments:
> [1]: 
> https://issues.apache.org/jira/browse/MNG-5858?focusedCommentId=14744204&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14744204
> 
> Kind regards
> Karl Heinz Marbaise
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder, Takari and Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
---------------------------------------------------------

A language that doesn’t affect the way you think about programming is not worth 
knowing. 
 
 -- Alan Perlis













---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to