On Wed, Aug 12, 2009 at 18:48, Eric Fetzer<elstonk...@yahoo.com> wrote:
> OK, so here's how I did it.  It works at least...  Can anyone think of a 
> better way (I think it's kind of ugly)?
>

This is a solution.

Note that if you want to stop at the first match, then you can
surround the inner for with ant-contrib's <trycatch>, and do what is
needed in the <catch> block.

<property name="outerlist" value="a,b,c"/>
<property name="innerlist" value="c,d,e"/>

<target name="doit">
    <for list="${outerlist}" param="outer">
        <sequential>
            <for list="${innerlist}" param="inner">
                <sequential>
                    <if>
                        <equals arg1="@{outer}" arg2="@{inner}"/>
                        <then>
                            <sequential>
                                <echo message="Found match for @{outer}"/>
                            </sequential>
                        </then>
                    </if>
                </sequential>
            </for>
        </sequential>
    </for>
</target>


-- 

Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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

Reply via email to