ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject Re: Tool Integration Problems
Date Fri, 08 Dec 2000 13:15:03 GMT

----- Original Message -----
From: "James Cook" <>
To: <>
Sent: Friday, December 08, 2000 4:39 AM
Subject: Tool Integration Problems

> 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
> 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.

Regardless of what Ant2.0 does regarding the provision of some DOM for an
ant build file, it may be good practice for all future ant tasks to start
adhering to the bean rules and provide side effect free accessor methods.
The reason I've rarely bothered on tasks I've written is that there was no
apparent value in the extra coding effort.

> Simply forcing Task authors to provide getters may be good enough. This
can be
> validated at parse time (in IntrospectionHelper) for enforcement.

dunno about enforcement. Kind of strict that. But it could be made part of
the requirements to get your task included into the cvs tree.


View raw message