ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <jakarta-...@ehatchersolutions.com>
Subject Re: Understanding directory-based tasks referred to by ID
Date Fri, 27 Dec 2002 13:54:53 GMT
I'll have a crack at answering this, although its possible I'll get 
something incorrect somewhere along the lines and others can correct...


On Thursday, December 26, 2002, at 10:34  AM, Chris Brown wrote:
>
> 1./ When is the collection of files in a fileset "built"?
>   (a) when the fileset element (with "id" attr) is parsed?
>   (b) when the fileset element is first referred to?
>   (c) each time the fileset is referred to?

(about to foot in mouth) I believe the answer is (c) as each task will 
do a getDirectoryScanner and re-navigate the directory specified.

>
> 2./ Once the fileset's contents are obtained?
>   (a) are they fixed for the remainder of the script?
>   (b) do they reflect changes (additions/deletions) made to the 
> filesystem
> during the build?

Based on my understanding, I think (b).  Both this question and the 
first one should be easy enough to test though, but I have not done so.

> 3./ If any of the fileset's attributes are based on expanded 
> properties,
> such as dir="${build}/lib/*.jar", when is this expansion performed?  
> For
> example, what happens if the fileset elements are defined outwith any 
> task
> or target, containing an expandable property, only defined in the 
> "init"
> target, where the fileset is referred to by a later "compile" target 
> that
> depends on "init"...?

This is an easy one.... properties are expanded as soon as the fileset 
is constructed, so the properties must be set before the fileset 
definition occurs during the build process.

	Erik


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message