You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Steele, Richard" <ri...@steelezone.net> on 2013/12/01 14:00:42 UTC
Re: Unexpected behavior
Thanks for the confirmation, I created bug #55831.
I'm assuming this problem will also rear up with our (legacy build's
mis)use of <antcall>, so this is actually pretty critical for us. Is there
any hope of a fix?
On Sat, Nov 30, 2013 at 11:20 AM, Stefan Bodewig <bo...@apache.org> wrote:
> On 2013-11-27, Steele, Richard wrote:
>
> > I've run into an odd behavior that I'm assuming is a defect but I'd
> > like to confirm.
>
> Looks like one, yes.
>
> > <project name="augment-test">
>
> > <target name="init">
> > <path id="inner"/>
>
> > <path id="outside">
> > <path refid="inner"/>
> > </path>
> > </target>
>
> > <target name="update-paths">
> > <augment id="inner">
> > <fileset dir="lib"/>
> > </augment>
> > </target>
>
> > <target name="a" depends="init, update-paths">
> > <echo message="${toString:inner}" />
> > </target>
>
> > <target name="b" depends="init, update-paths">
> > <echo message="${toString:outside}" />
> > </target>
>
> > </project>
>
> <snip/>
>
> > However, if I call it with both "a" and "b" the value of the "outer" path
> > is empty:
>
> augment is a very special task in many ways, in particular it doesn't
> perform it's work in the execute method but while the representation of
> the piece of XML that makes up the task is mapped to a Java object tree.
>
> If you execute a target twice, this translation only happens once, so
> the second invocation is a NOOP. But this is an implementation detail
> that users should never have to deal with, so in a way it is a defect.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
Re: Unexpected behavior
Posted by "Steele, Richard" <ri...@steelezone.net>.
Confirmed: a target "ab" that antcalls a and b individually doesn't exhibit
the same problem.
On Mon, Dec 2, 2013 at 12:12 AM, Stefan Bodewig <bo...@apache.org> wrote:
> On 2013-12-01, Steele, Richard wrote:
>
> > Thanks for the confirmation, I created bug #55831.
>
> Thanks.
>
> > I'm assuming this problem will also rear up with our (legacy build's
> > mis)use of <antcall>, so this is actually pretty critical for us.
>
> Actually, <antcall> might "fix" it for you as each <antcall> will set up
> a fresh instance of the <augment> RuntimeConfigurableWrapper and you are
> not running the same task instance twice.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
Re: Unexpected behavior
Posted by Stefan Bodewig <bo...@apache.org>.
On 2013-12-01, Steele, Richard wrote:
> Thanks for the confirmation, I created bug #55831.
Thanks.
> I'm assuming this problem will also rear up with our (legacy build's
> mis)use of <antcall>, so this is actually pretty critical for us.
Actually, <antcall> might "fix" it for you as each <antcall> will set up
a fresh instance of the <augment> RuntimeConfigurableWrapper and you are
not running the same task instance twice.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org