You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by satheesh <ts...@yahoo.co.uk> on 2006/07/29 05:49:16 UTC

ant task

I have written a java class which will add two values and print it in the
console and I called that class in ant as mentioned below,
how can I get that value (or returned that value from class) back to ant
target or the property tag

<taskdef name="adder" classname="net.wyeast.ant.Add"/>

<target name="main">
 <adder op1="23" op2="77"/>
<target>

What's the solution for this proble? 

Thanks, 
satheesh


-- 
View this message in context: http://www.nabble.com/ant-task-tf2018649.html#a5550504
Sent from the Ant - Users forum at Nabble.com.


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


Re: ant task

Posted by Petar Tahchiev <pa...@gmail.com>.
On 29/07/06, satheesh <ts...@yahoo.co.uk> wrote:
>
> I have written a java class which will add two values and print it in the
> console and I called that class in ant as mentioned below,
> how can I get that value (or returned that value from class) back to ant
> target or the property tag
>
> <taskdef name="adder" classname="net.wyeast.ant.Add"/>
>
> <target name="main">
>  <adder op1="23" op2="77"/>
> <target>
>
> What's the solution for this proble?
>
> Thanks,
> satheesh
>
>
> --
> View this message in context: http://www.nabble.com/ant-task-tf2018649.html#a5550504
> Sent from the Ant - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
You could simply add a new property, which has the result for its
value. This is done by the following:

getProject().setNewProperty(property, value);

in your task's java code.

-- 
Regards, Petar!
Karlovo, Bulgaria.

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