ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: parallel ant calls not working?! help please.
Date Fri, 30 Jul 2004 00:33:23 GMT

Khehra, Sukh wrote:
> Hi,
> is it not true that the law of "properties not being mutable" can be circumvented by
using "antcall"s? 

It can seem to have that effect but it is not *strictly* true. Each 
antcall runs in its own "context" and therefore properties set within 
that context do not affect a property of the same name in a different 
context. For the purposes of your usage, however, the distinction is not 

> if yes, how do i explain this? this works fine if i don't try to make the antcalls in
> *************************
> my build.xml is
> <project name="test2" default="qa-rails">
> <taskdef resource="net/sf/antcontrib/antlib.xml"/>
> <target name="qa-rails">
> <for param="file" parallel="true">
>   <path>
>     <fileset dir="properties/qa/rails" excludes=""/>
>   </path>
>   <sequential>
>     <echo message="@{file}"/>
>     <propertyregex override="yes"
>       property="program"  input="@{file}"
>       regexp=".*[/\\]([^\.]*)\.properties" replace="\1"/>
>       <antcall target="tar">
>          <param name="" value="properties/qa/rails/${program}.properties"/>
>          <param name="" value="properties/qa/rails/"/>
>          <param name="targetdir" value="targets/qa"/>         
>          <param name="environment" value="rails"/>
>       </antcall>      
>   </sequential>
> </for>

My guess, and I don't have much experience with these particular tasks, 
is that you are coming unstuck in the setting of the "program" property. 
Since this is presumably being done in multiple threads, there is some 
sort of collision occurring on the setting of that value.

IOW, you really need to move the setting of "program" into the antcall'd 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message