You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Júlio Cesar Bueno Cotta <ju...@gmail.com> on 2009/11/25 22:23:50 UTC
How to do a custon task return a string
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.
--
Júlio Cesar Bueno Cotta
Graduando em ciência da computação
Universidade Federal de Viçosa
Re: How to do a custon task return a string
Posted by Júlio Cesar Bueno Cotta <ju...@gmail.com>.
Thanks all!
:D
It works!
2009/11/26 <Ja...@rzf.fin-nrw.de>
>
> >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
>
>
> http://ant.apache.org/manual/tutorial-tasks-filesets-properties.html#ret
> urning-list<http://ant.apache.org/manual/tutorial-tasks-filesets-properties.html#ret%0Aurning-list>
>
>
> Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
--
Júlio Cesar Bueno Cotta
Graduando em ciência da computação
Universidade Federal de Viçosa
AW: How to do a custon task return a string
Posted by Ja...@rzf.fin-nrw.de.
>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
http://ant.apache.org/manual/tutorial-tasks-filesets-properties.html#ret
urning-list
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: How to do a custon task return a string
Posted by Gilbert Rebhan <an...@schillbaer.de>.
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