ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: [PATCH] Allow "if" and "unless" attributes on the Sequential and Parallel tasks
Date Tue, 11 Sep 2001 06:00:46 GMT
Sorry for the late reply Matthew, I've been on vacation.

On Fri, 24 Aug 2001, Matthew Inger <> wrote:

> I'm not saying it has to be a catch all, but i don't see what the
> issue is with allowing the simple if and unless attributes on the
> two above tasks.

Depends on what you want to accomplish with/for Ant.

There are several tasks that may deserve an if/unless attribute and
where not having the attributes leads to rather complicated constructs
- <fail> is the prime example.

The committers of Ant have more than once declined if/unless
attributes for tasks in general - just look up the discussion around
Ant2 in the archives.

I'm not saying that these attributes couldn't lead to cleaner and
easier to understand build files if they were available, but they also
have to potential to achieve the opposite effect.  People start using
<antcall> instead of the superior depends attribute of target for
example, just because it is there.

> Being that they already exist on the "<target>" tag, I don't see how
> it's any different to allow them the sequential and parallel tags.

<target> is not a task.

My argument was that having an if attribute on <sequential> is an <if>
task in disguise and I'd prefer a full blown <if> task any time as
your suggestion will lead to 

<condition property="some-prop">
<sequential if="some-prop">

for everything that is a bit more complicated than just looking up a
single property.  This is the same bloat you wanted to avoid.


View raw message