ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steele, Richard" <r...@steelezone.net>
Subject Re: Unexpected <augment> behavior
Date Sun, 01 Dec 2013 13:00:42 GMT
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 <bodewig@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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message