ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: why not conditions on tasks as on targets?
Date Wed, 16 Jul 2003 14:19:13 GMT
Let's just say it's been long debated, and never got in... It's in fact
technically *very* easy to do, and several proposed patches implemented it,
but somehow was never accepted. OSS ain't democracy, but a meritocracy ;-)

The lack of this feature leads to what I like to call spaghetti Ant code
with a bunch of targets and lots of if/unless on them! To be honest, I'm
using Ant-Contrib's <if> and <switch>. And it's probably part of the reason
it never made it to Ant; since there's an alternative, the Ant committers
have an excuse for refusing to put in this controversial feature. I'm not
trying to point fingers to anyone, it's just my interpretation of the facts.

On a more hopeful note, what you are asking is an aspect, i.e. something
applicable to all tasks in Ant, and that should therefore be coded in at the
framework level rather than the task level. There was recent discussion to
allow pluggable aspects, so you could for example add this feature to Ant
yourself. Unfortunately, these will not be in Ant 1.6, and were pushed to
1.7 or later.

Does that answer your question? --DD

> -----Original Message-----
> From: Daniel Barclay []
> Sent: Wednesday, July 16, 2003 9:07 AM
> To: Ant Users List
> Subject: Re: why not conditions on tasks as on targets?
> Alexey Solofnenko wrote:
> > I think the answer on your question would be: "Because it can be done
> better
> > by using <if> or by better organizing your tasks, so you would not need
> this
> > feature."
> Okay, let me try one more time:
> Given that targets do have if and unless attributes, why don't tasks?
> Daniel

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message