Ant Reading multiple list from Properties in one for loop

663 Views Asked by At

I have properties file that contains two list.

listA=A1,A2,A3
listB=B1,B2,B3

In my build file I am trying to get the value from both list at the same time, meaning if I am getting 2nd value from listA and then I should get the 2nd value from listB. I couldn't find anything like index in ant. My for loop looks like below it works but for loop run 6 times.

<for list="${listA},${listB}" param="temp">
        <sequential>
            <echo>temp ${temp}</echo>
        </sequential>
</for>

Output :

temp A1
temp A2
temp A3
temp B1
temp B2
temp B3

Is there any way to read both list at the same time and get values in two different variables

Ideally I am trying to achieve is something like below

<for list="${listA},${listB}" param="tempa,tempb">
    <sequential>
        <echo>tempa ${tempa} , tempb ${tempb}</echo>
    </sequential>
</for>

which should return following Output :

temp A1 , temp B1
temp A2 , temp B2
temp A3 , temp B3
0

There are 0 best solutions below