> The <Ant /> task handles <property > tags. At the moment it does this as
> follows:
>
> > public Task createProperty() {
> > Property p=(Property)p1.createTask("property");
> > p.setUserProperty(true);
> > properties.addElement( p );
> > return p;
> > }
And if we make properties which are global, then this is wrong. Property
would no longer be a task, but something that was parsed and set on the
project object iteself.
When did this change get made? Yuck.
Project.setProperty(name, value)
Project.getProperty
This is the only API for properties there should be. Let me draw out a
psuedo DTD (even though the design of Ant prevents a formal DTD from being
used) that explains how build.xml file was designed to be structured:
<!ELEMENT project (taskdef*, property*, task*)>
<!ELEMENT taskdef (EMPTY)>
<!ATTLIST taskdef
name CDATA
class CDATA)>
<!ELEMENT property (EMPTY)>
<!ATTLIST property
name CDATA
value CDATA)>
<!ELEMENT task (ANY)>
<!ATTLIST task (ANY)>
As you can see, it wasn't an intent of mine to make a property task, but for
properties to be project scoped. I propose to take it back to that.
.duncan