You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Karr, David" <da...@wamu.net> on 2005/06/13 00:32:48 UTC

Ant1.5.4: How to "accumulate" values into a string?

Is there any way to "accumulate" values into a stringbuffer and then
later get back the accumulation?  I can't do this with properties, as
they apparently can't be used that way.

I have a target that is going to call another target several times, each
time passing a parameter.  In that target, I want to store the parameter
so that after the main target has finished calling the subtarget N
times, I want to then extract what has been accumulated.

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


Re: Ant1.5.4: How to "accumulate" values into a string?

Posted by Jeffrey E Care <ca...@us.ibm.com>.
You could echo the strings to a temporary file (using append mode) & then 
load the file into a property once all the antcall invocations are 
complete.

-- 
Jeffrey E. Care (carej@us.ibm.com)
WebSphere Build SWAT Team Lead
WebSphere Build Tooling Lead (Project Mantis)
https://w3.opensource.ibm.com/projects/mantis


"Karr, David" <da...@wamu.net> wrote on 06/12/2005 06:32:48 PM:

> Is there any way to "accumulate" values into a stringbuffer and then
> later get back the accumulation?  I can't do this with properties, as
> they apparently can't be used that way.
> 
> I have a target that is going to call another target several times, each
> time passing a parameter.  In that target, I want to store the parameter
> so that after the main target has finished calling the subtarget N
> times, I want to then extract what has been accumulated.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>