ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Duncan Davidson" <>
Subject Re: <Ant /> on multiple sub-projects
Date Mon, 06 Mar 2000 23:58:48 GMT
> 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)

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.


View raw message