ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: default directory for directory attribute tasks
Date Tue, 13 Apr 2010 14:35:36 GMT
On 2010-04-13, Raja Nagendra Kumar <Nagendra.Raja@tejasoft.com> wrote:

> Stefan,

>> If you really want the directory that contains the build file

> Yes, I am looking for a way to reference dir that contains the build
> file.  this location is different than basedir.

Take the approach described in the manual page for <import>.

> In my case, the project does not have any name, hence as generic
> approach of referring to this file would help a lot..

The location of the main build file is ${ant.file} - otherwise your
project must have a name.

> similar lines to 'this ' used in java.

${ant.file} is the "this" of the main build file, for any
imported/included file we need a different "this" and given the
immutability of properties we need different names for them - this is
only possible if we have something meaningful (ant.file.SOME_GUID
wouldn't help anybody) and thus need the build file writer's help via
<project>'s name attribute.

Stefan

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


Mime
View raw message