I haven't created hundreds of ANT build files, but my intuition is that <target> being restricted from property evaluation isn't that bad. IMHO testing for the presence/absence of a property is fine at the <target> level. I don't mind introducing yet another property name just for the conditional execution of a <target> where it gets annoying is thinking up new one-time-use property names inside of a target.
Instead of putting expression evaluation inside of if="" which will probably break someone's buildfile somewhere, why not make a new attribute called ifexpr="" (or similar)? Whatever expression language is decided on, I'd like to see something very readable like: <somecmd ifexp="${mode}=debug"> </somecmd> ----- Original Message ----- From: "Matt Benson" <[EMAIL PROTECTED]> To: "Ant Developers List" <[EMAIL PROTECTED]> Sent: Thursday, July 22, 2004 7:58 AM Subject: Re: new Task subclass > --- Stefan Bodewig <[EMAIL PROTECTED]> wrote: > [SNIP] > > if/unless on a task or a nested element of a task > > are normal > > attributes and as such get expanded. if/unless on > > <target> doesn't > > get expanded. > > > Doh, that's right.... back to THAT big argument again. > But if the same principles apply, <target> would be > restricted from expression evaluation for the same > reasons as it is restricted from property evaluation, > no? > > Also, let me add this reminder to the discussion: > IMHO we should be able to completely substitute Ant's > PropertyHelper, and further we should be able to do it > using Definitions and References, i.e. with current > infrastructure, and without writing Java code, but due > to the nature of what a PropertyHelper is/does, > combined with the fact that references are set before > elements are resolved (and possibly other factors?), > *I* couldn't get it to work. Again, the example is > something like: > > <typedef name="myph" classname="my.PropertyHelper"/> > <myph id="ant.PropertyHelper" /> > > -Matt > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - 50x more storage than other providers! > http://promotions.yahoo.com/new_mail > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]