ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: NOT A SOLUTION: Modifying a DirSet (or any AbstractFileSet) f rom within a <script>
Date Tue, 16 Sep 2003 08:21:37 GMT
On Mon, 15 Sep 2003, Ken Gentle <j.kenneth.gentle@acm.org> wrote:

> Part of the problem is that AbstractFileSet creates a new
> DirectoryScanner on each call to "getDirectoryScanner"

This is so that it can pick up changes that have happened between
invocations.  Part of fileset's contract is that the files it returns
actually exist.

The silly example

<delete ...>
  <fileset id="foo" .../>
</delete>
<copy ...>
  <fileset refid="foo"/>
</copy>

would certainly violate that contract if the second fileset didn't
rescan the directory.  OK, it would be enough to rescan instead of
creating a new DirectoryScanner instance.

> Looking at the Ant sources, one can kind of see how things got this
> way, through adding features and behavior to DirectoryScanner.  But
> it sure makes any low-impact enhancement a real pain.

I agree.

Stefan

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


Mime
View raw message