From: "Stefan Bodewig" <[EMAIL PROTECTED]>
> Like I said, syntax could come later.
>
> I'd probably decide at the <ant> level which properties are being
> passed to the subbuilds rather than deciding at the property
> declaration (this could even be different for different subbuilds).
As I mentioned in a previous mail (to Eric?) I think the container needs to
provide a registration service that is in charge of enforcing the scoping rules
not only for properties and datatypes, but for other things (including tasks).
The registration service would support having separate namespaces each one
enforcing its own scoping rules (from a predefined set), and enforces those
rules. Tasks (and core) performe operations via the API.
Some predefined namespaces could be:
- "ant.tasks" -> a per project flat namespace containing the declarations
of tasks and datatypes.
- "ant.properties" -> a per project scopped namespace containing properties
and DT instances.
- "ant.projects" -> a (per project?) flat namespace for <projectref>ed
names.
Tasks may define their ows, like for storing "script" definitions, or named DB
connections or
whatever.
The API will provide operations like: get(), put(), newScope() or push()/pop().
The container in
return will apply the rules, like allowing or not redefinitions. Actually these
rules may be defined
by objects implementing these policies and stored on the namespace itself. This
would allow for
pluggable scopping rules in the future :-) (Oh well maybe this is a little too
FSD :-) ).
Of course, all the names used above are just for sake of example and I feel no
attachement to them. ;-)
Jose Alberto