ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Barclay <>
Subject inconsistency in top-level items; automatic init. task?
Date Fri, 18 May 2001 20:29:29 GMT
There seems to be an inconsistency in what can appear at the top level
of a build file (not under any target).

"property" tasks and some related items (e.g, <path ...>, <taskdef ...>) 
can appear at the top level of a build file and are processed before 
executing any target.

However, other items that would seem to go with those items (e.g., the
"available" task, which also sets properties) cannot appear in the same 
place (at the top level of the build file).

This seems to be an unnecessary inconsistency.

If property tasks can appear at the top of a build file, effectively
forming a set of tasks performed in an anonymous initialization target,
why can't any task appear at the top level?

Apparently, one solution is to put initialization items in an (unofficial)
initialization target, but then you have to explicitly make everything 
dependent on that target.

Why not either:
- let any task appear at the top level, or
- define an initialization target (when a target has some distinguished
  name like "init" or something, every other target implicitly depends
  on it)

Daniel Barclay
Digital Focus

View raw message