ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: <ant> and basedir
Date Fri, 29 Aug 2008 13:48:02 GMT
On Thu, 28 Aug 2008, Dominique Devienne <ddevienne@gmail.com> wrote:

>On Thu, Aug 28, 2008 at 10:26 AM, Stefan Bodewig <bodewig@apache.org> wrote:
>> ,----
>> | If you set allowNativeBasedir to true, the basedir of the new
>> | project will be whatever the basedir attribute of the <project>
>> | element of the new project says - no matter what any other attribute
>> | of this task says and no matter how deeply nested into levels of
>> | <ant> invocations this task lives.
>> |
>> | If you haven't set allowNativeBasedir or set it to false, the
>> | following rules apply:
>> `----
>
> Amen to that!

Done in trunk.

I'm not sure about the new attribute's name (that's why I haven't
documented it yet).  Right now it is "allowNativeBasedir", but I don't
think I like it.  useNativeBasedir?

> BTW, I hope that this doesn't imply one needs to explicitly write
> basedir=".", i.e. that specifying no basedir is equivalent to
> basedir=".".

I haven't tested it, but no basedir should resolve to the build file's
directory just as it does when invoked from the command line (the
basedir property isn't set at all and thus the "normal rules" apply).

> Now if only <import> would work the same ;-)

We disagree here.  Writing ${basedir}/ in front of every location in
the imported file would be pretty tedious.  IMHO it is far more common
that you want files resolved relative to basedir than relative to the
location of the imported file.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message