ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Ellsworth <>
Subject Re: Way to use a fileset for uptodate's "to" or "mapper"
Date Wed, 10 Jul 2002 06:27:37 GMT

On Tuesday, July 9, 2002, at 06:25  PM, Diane Holt wrote:

> --- Scott Ellsworth <> wrote:
>>> I am trying to wrap my head around something, and kind of failing.  
>>> What am I missing?
>> Turns out that <dependset> was what I was missing.
> [snip]
>> The only problem I am missing now is how to know when to build if 
>> dependset deletes my files.  If I run the above, it will certainly 
>> eradicate everything in the directory if they are out of date, but 
>> unless I know that something got deleted, I will not know that I 
>> should regenerate the files.
> Do you actually want everything in the directory deleted, if anything's 
> out-of-date (ie., if any one thing is out-of-date, does that actually 
> require everything get rebuilt)?

The rebuild process actually generates everything, and cannot tell what 
it wil generate.  Thus, if any one thing is out of date, I might as well 
delete everything.

> If not, then <dependset> probably isn't the best way to go. On the 
> other hand, if yes, then whatever target currently builds this stuff 
> should just depend on a target that has the
> <dependset>, so it'll go do that first, then, when it comes back to the 
> original target, the task(s) in it will build whatever would normally 
> get built when none of the target-files are there.

The problem, though, comes back to uptodate on a fileset - since we do 
not know what files will be generated, just the directory in which they 
will be generated, and a list of files _not_ to include, I cannot see a 
way to create a uptodate task for the generator task.

It seems like the "available" task should be able to do what I need - 
something like:

filesInOutputNotGenerated = ", bar.sql"
outputDirectory = "source/com/alodar/files"

<available property="intercalate.upToDate">
     <fileset directory="${outputDirectory}

should set the intercalate.upToDate property to "true" if any files 
exist in the outputDirectory which are not in the 
"filesInOutputNotGenerated" list.

If I do the aforementioned dependset first, then files other than those 
in the "NotGenerated" list will only be there if the directory was up to 

I can then use the "intercalate.upToDate" property in an unless for my 
main task, as long, of course, as the property only is created if its 
value is true.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message