ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: if/unless at the task level?
Date Mon, 02 Oct 2000 06:00:09 GMT
On Sun, 1 Oct 2000, Diane Holt wrote:
> Would it be too difficult/weird/impossible to have if/unless available at
> the task level instead of only at the target level? Would you be able to
> do it in and have it be available to all the tasks that do
> "extends Task" (or MatchingTask), rather than having to go thru and change
> each task's .java file?  I've been "pseudo-coding" a large target, and
> including if/unless in the tasks that comprise it (just as a reminder for
> now), but I'm looking at it, and it'd sure make for a much more compact
> (and I think easier to follow) build-file if it was actually workable that
> way, instead of having to have a separate target for each task that has a
> conditional execution.

I don't think it makes sense conceptually. Targets are units
of work in building a dependancy system. Each unit has many
tasks but how can you tell which tasks are allowable to be
elided via if/unless and which aren't ? Obviously a mkdir
has to occur before a copy but this again puts the
complexity in hands of ant user rather than developer which
is a bad thing IMHO. Similar reasoning why for/while/if/then
constructs are not wanted in core task.



| Latrobe University,     | Does the name 'Pavlov' |
| Bundoora, Australia     |    ring a bell ?       |

View raw message