ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: Accessing properties in a custom ant task
Date Fri, 24 Jan 2003 22:18:14 GMT
Right on! I would have said getProject().getProperty("test.property");

Which uses the public accessor rather than the protected member. --DD

-----Original Message-----
From: ashoka.upadhya@gtnexus.com [mailto:ashoka.upadhya@gtnexus.com] 
Sent: Friday, January 24, 2003 4:08 PM
To: 'Ant Users List'
Subject: RE: Accessing properties in a custom ant task


project.getProperty("test.property");

-Ashoka

-----Original Message-----
From: Nau, Michael [mailto:Michael.Nau@pyxis.com]
Sent: Friday, January 24, 2003 2:04 PM
To: ant-user@jakarta.apache.org
Subject: Accessing properties in a custom ant task


Is there a way to access ant properties within a custom task?

For example:

<property name="test.property" value="testing..."/>

<target name="test-mytask">
   <taskdef resource="mytask.properties" classpathref="mytask.cp"/>
   <mytask/>
</target>  

How can I access the value of test.property within the java code that
creates mytask?

Thanks,
Mike.



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

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

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


Mime
View raw message