How can I create a dynamic list of files in Ant, then save this list for later use in the build process? What I am thinking of is something like an immutable Fileset. Filelist won’t work since it doesn’t accept wildcards.
In other words, I want to create a list of files based on include/excludes wildcards that does not change once it’s created. That is, even if more files are added later that pass the inclusion/exclusion rules — I want to preserve the initial Fileset result (specifically for deletion later in the build process). Is this possible?
Well, here’s what I came up with. Store fileset to property using pathconvert. Then iterate over files later in the build, doing whatever you need to with them. In my case, deleting them.