ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harry_ <harjitwo...@gmail.com>
Subject Re: Running parallel targets in Ant loop
Date Wed, 11 Nov 2009 14:39:20 GMT

Thanks for replying...

But using <parallel> within for loop (see how I used it below) is not
serving my purpose... It is firing antcall's sequentially... I want to run
multiple instances of target "run-test" with different values for id
param....

   <target name="run">
        <for begin="1" end="2"  param="idx">
            <sequential>
                <parallel>
                    <antcall target="run-test">
                        <par am name="id" value="${idx}"/>
                    </antcall>
                </parallel>
            </sequential>
        </for>
   </target>


cvsusr wrote:
> 
> you can use <parallel> task.. 
> 
> 
> 
> Harry_ wrote:
>> 
>> Hi,
>> 
>> I need to run multiple target in Ant's loop. How can I achieve this. I am
>> able to make antcall in sequential way as described below. 
>> 
>>     <target name="run">
>>     		<for begin="1" end="2"  param="idx"> 
>>      	   <sequential>  
>> 	           <antcall target="run-test">
>> 	                
>> 	                
>> 	                
>> 	                
>> 	                
>> 	                
>> 	                
>> 	            	
>> 	            </antcall>
>> 	 	   </sequential>  
>>      	 </for>  
>>     </target>
>> 
>> But I need to do performance testing where i need to call multiple
>> targets with various values of idx.  If I change sequential to parallel,
>> i get following error:
>> 
>> C:\Eclipse3.1\eclipse\Workspace\AntProject\d6\build.xml:53: Invalid type
>> class org.apache.tools.ant.taskdefs.Parallel used in For task, it does
>> not have a public iterator method
>> 
>> 
>> Is there any way to achieve what I desire. i.e running parallel targets
>> with different value of idx (As sometime I had to run multiple targets
>> sometime up to 30).
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Running-parallel-targets-in-Ant-loop-tp26294167p26302304.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Mime
View raw message