Right on! I would have said getProject().getProperty("test.property");

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

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
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:[EMAIL PROTECTED]]
Sent: Friday, January 24, 2003 2:04 PM
To: [EMAIL PROTECTED]
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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to