At 05:27  15/1/01 -0800, Peter Vogel wrote:
+1 to everything you said except


>4.    There should be a way for a task to influence the dependencies of other
>       tasks (i.e. if I implement a dependency scanner, how does that scanner
>       notify ant of the dependencies it finds?)

Could you expand on this. Do you mean the depends tag in targets or the
internal dependencies of tasks. If the second then what do you think of
this. The recent Zip submission with a ZipScanner + Stefans comments
earlier inspired this model.

Anything that works on other things (whether they b ldap entries, files,
packages etc) will follow this model. We have 
* Scanner component
* Mapper component
* ItemSet component

The ItemSet component specifies the items or patterns to match in set of
items. So in this case we would have FileSet that specifies specific files,
or specific patterns etc.

The Mapper component is responsible for mapping items found in the ItemSet
to target items.

The Scanner is responsible for looking in a location for the items in ItemSet.

Thus all file orientated tasks would have a
* FileSet
* DirectoryScanner
* A Mapper - usually identity but sometimes globber (for jarring/zipping)

The recent submission has a ZipScanner that scans from contents in zip
files. It still uses FileSet and Mappers but now reads from Zip rather than
directory.

This could be generalized so you could have FTPScanners, WebDAVScanners and
other ones that would be useful in build process. 

Thoughts ?

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*

Reply via email to