dcsimg
Obtaining values back from User defined tasks?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Simon_Ablett
Posted On:   Tuesday, April 16, 2002 07:11 AM

Is there any way to obtain values back from a user defined task in Ant? I have written a task in Java that reads values from a data source and I would subsequently like to use these values as part of my build process. I don't want to have to specify these values as command line properties using the '-D' flag. Note that I know how to pass values into the task and this works fine.

Regards.

Re: Obtaining values back from User defined tasks?

Posted By:   Erik_Hatcher  
Posted On:   Tuesday, April 16, 2002 12:46 PM

You can provide them back as Ant properties, using project.setProperty (Ant 1.4.1) or project.setNewProperty Ant 1.5). Keep in mind that properties are designed to be immutable, so try not to set a property if it already has a value.
About | Sitemap | Contact