--- On Thu, 9/24/09, Peter Reilly <peter.kitt.rei...@gmail.com> wrote:
> From: Peter Reilly <peter.kitt.rei...@gmail.com> > Subject: Re: if/unless Attributes > To: "Ant Developers List" <dev@ant.apache.org> > Date: Thursday, September 24, 2009, 12:36 PM > using <target name="x" > if="${foo}"> > seems to be very very strange.. > Maybe it seems that way, but taking into account you'd have to be deliberately using propertyhelper delegates to make proper use of this, it might look like: <target name="x" if="${boolean:${do-x}}" unless="${boolean:${skip-x}}"> <...> </target> -Matt > > Peter > > > > On Thu, Sep 24, 2009 at 5:09 PM, Stefan Bodewig <bode...@apache.org> > wrote: > > On 2009-09-24, Stefan Bodewig <bode...@apache.org> > wrote: > > > >> <target if="${foo}"/> > > > >> will only be executed if a property named ${foo} > exists (unexpanded) - > >> in Ant 1.7.1. and Ant 1.8.0 - or if expanding > ${foo} returns something > >> that equals Boolean.TRUE (Ant 1.8.0 only). > > > > This part is false, I just re-read the code. It will > look up a property > > named like the expansion of ${foo} - and it's been > that way in 1.7.1 as > > well. > > > > This doesn't change the rest of what I wrote, you'd > still need > > <target if="${foo}"/> if you wanted to skip a > target if foo evaluated to > > "false". > > > > Stefan > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org > > For additional commands, e-mail: dev-h...@ant.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org > For additional commands, e-mail: dev-h...@ant.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org