ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Duncan Davidson <>
Subject Re: Tool Integration Problems
Date Sun, 10 Dec 2000 20:02:44 GMT
On 12/7/00 8:39 PM, "James Cook" <> wrote:

> It appears that a Task does not have to conform to JavaBean standards,
> meaning that there is no way for a tool to ascertain what value an attribute
> was set to. For example, given a particular Task such as, there
> is a setDir(File) method, but no getDir() method. Therefore, a tool that
> wants to display the value of "dir" to a user for editing is out of luck.
> The only alternative is to parse the XML file manually to obtain the value
> of these attributes.
> Is this a fairly correct statement?

It may be correct in Ant.present.. And there could be a mandate that all
Tasks should have gets, but that is just a mandate and not enforceable at
the code level.

This is one of the many reasons why AntEater doesn't place instances of the
Task implementation itself into the object tree -- but a generic Task object
which has a hold of all the attributes in Hashed form. Therefore, this setup
should allow a FrontEnd (AntEater parlance for a client that is using ant
such as a GUI) to fully breeze through all the attributes of a Task without
requiring that instance implementations of that Task actually implement

The other benefit to this approach is that instances aren't created until
exactly the time they are needed. This forces all properties to be resolved
right at execution time instead of any other time -- and makes sure that the
task at hand only sees the project tree as it exists right when it is

> I feel if each tool is responsible for parsing a build file then we are in
> for a world of hurt regarding compatibility.

Yep. The goal in AntEater is to have the ability to get the object tree from
any FrontEnd via a ProjectBuilder.buildFromFile(File file) call and use it
-- centralizing all logic into one place.

James Duncan Davidson                              
                                                                  !try; do()

View raw message