ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Duncan Davidson" <>
Subject Re: Tasks containing other tasks (was: Subtasks within tasks)
Date Fri, 25 Feb 2000 23:23:30 GMT
> <switch name="">
> <case value="Mac OS">
> <javac ..... />
> </case>
> <case value="Win*">
> <javac ..... />
> </case>
> <deafult>
> <Deltree ..... />
> </default>
> </switch>

The problem that I have with this is that it introduces logic into the
antfile. It was an explicit design goal of mine when I first wrote ant for
the files to be totally declaritive and *all* logic occurs in the task. If
you want to write specialized logic, you can -- it's easy enough to add
tasks via the <taskdef...> -- now, if the group wants to change course on
that, that's something I can't control, but I won't welcome it.

This means that I would prefer not to see anything like an if/then/else,
for, or switch implemented in this fashion. If you want to build logic, do
it in Java. If you want to describe the project, do it in XML.


View raw message