ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hardacker, Andrew" <Andrew.Hardac...@Compuware.com>
Subject RE: Can I access ant's basedir value from a Task?
Date Fri, 20 Jun 2003 20:41:23 GMT
It's actually a built-in property. You can use ${basedir}.

(JDA page 66, but granted the index is a little weak.)

Andy Hardacker

-----Original Message-----
From: peter reilly [mailto:peter.reilly@corvil.com]
Sent: Friday, June 20, 2003 1:29 PM
To: Ant Users List
Subject: Re: Can I access ant's basedir value from a Task?


It is a property - basedir.

getProject().getProperty("basedir")

Peter

On Fri, 2003-06-20 at 18:23, Eric Youngquist wrote:
> I was wondering if I could access ant's basedir value from within a task
without physically passing the value in as an attribute.
> 
> Here is the project line from my build.xml:
> 
>     <project name="mytask" default="main" basedir="/my/taskdir"> 
> 
> I would like to access ant's basedir value from inside a task.  I have
done some news group searches and flipped through the book Java Dev with
Ant, but I have not found anything.  
> 
> Thanks,
> Eric


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



The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it. 


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


Mime
View raw message