FAQ

[Ant-user] How to do a custon task return a string

Gilbert Rebhan
Nov 25, 2009 at 10:06 pm

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
reply

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 4 | next ›