ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hari.kalako...@verizon.com
Subject How to pass a value from a custom task to ant ?
Date Thu, 13 Feb 2003 02:28:34 GMT
I am writing a custom task in which I get the value of a variable by some
processing say dir= foo/bar.
I want to use this value in my ant script in subsequent processing.  I
tried setting the dir value to a system
property as System.setProperty("dir",dir), but when I tried to access I
could not access this value from ant.
I am accessing  like this

<property name="somename" value="${dir}"/>
when I echo

I get as ${dir} notthe value foo/bar

The same this if I set from command line as ant -Ddir=foo/bar I get it
correctly.
What is the problem.  Can we not access like this.
Is the ant going to read system properties at startup and doesn't care
about the properties set at runtime ?

If anybody has any idea please throw.

thanks
HP



Mime
View raw message