ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: GUMP failure caused by ANT (Re: [GUMP] Build Failure - Axis)
Date Wed, 10 Sep 2003 11:11:28 GMT
On Mon, 08 Sep 2003, Steve Loughran <steve_l@iseran.com> wrote:

> FYI: a recent change (few weeks back?) is breaking Axis in its
> iterative build (uses a descendent of ant-contrib's foreach)

I think I've tracked this down, finally.

target compileJunit in buildTest contains a <foreach> task that under
the covers invokes something close to

        <ant antfile="buildTest.xml" target="component-compile">
          <property name="file" value="...test/RPCDispatch/build.xml"/>
        </ant>

(the ellipsis is mine as this contains the absolute path) in the first
iteration.  The second one will be

        <ant antfile="buildTest.xml" target="component-compile">
          <property name="file" value="...test/RPCDispatch/build.xml"/>
          <property name="file" value="...test/badWSDL/build.xml"/>
        </ant>

as you reuse the old Ant instance.  I.e. each iteration adds a nested
<property> for the same name.

Ant 1.5.x will use the last one to finally set the property while
Ant's CVS HED uses the first definition - and we end up running the
same build file twelve times instead of twelve different files.
Ending up with uncompiled sources.

We've certainly never defined the behavior that is to be expected when
multiple <property> elements occur for the same name, but as this is
supposed to be the same as a command line execution, expecting the
last one to win seems reasonable to me (it works that way via Ant's
CLI interface).

I'll look into fixing that.

BTW, line 187 in ForeachTask should probably better read

        if (callee2 == null) {

Cheers

        Stefan

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


Mime
View raw message