ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <...@schillbaer.de>
Subject Re: How to do a custon task return a string
Date Wed, 25 Nov 2009 22:06:25 GMT
JĂșlio Cesar Bueno Cotta schrieb:
> Hello people,
> I need your help again.
> I coded a custon task in Java and I need return a String to the build.xml
> where the task is called.
> How can I do that?
> I am thinking in send write the string into a property file and so read the
> file from the ant build, but that is not a very good way to do that.
> Thanks all.
> 

let your task create a property via
project.setNewProperty(String name, String value)
for further use in your ant workflow.
Create an attribute for that property and let the user decide
how to name it, f.e.

<yourtask input="foo" outproperty="bar" ... />
...
<echo> $${bar} == ${bar}</echo>


Regards, Gilbert




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


Mime
View raw message