ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Donie <>
Subject RE: Specifying explicit file lists (FileSets) in MatchingTasks
Date Wed, 10 Jan 2001 19:24:32 GMT
I too would like to be able to do something like this. Right now (early in
the process of this project) we have set up some .txt files that have lists
of files that need to be RMIC'd, added to a client-side jar, or added to a
server-side jar. Currently the "ClientManifest.txt" and "ServerManifest.txt"
files have one line per file to be included, and each line looks like:
The "RMICManifest.txt" file has lines with classnames:
This was originally done so a NT batch file could do the RMIC step and then
make the jars. Now I'm trying to do this with Ant and I'm not sure how to do
it. Can I do something like have the list of files in a .properties file and
read that in with a property task, then use that in a fileset? I'll try that
to see what happens. Right now the code isn't organized or named in any way
that I could use include/exclude patterns, but it's not too late to make
that kind of change if needed.

-----Original Message-----
From: David Dabbs []
Sent: Tuesday, January 09, 2001 1:23 PM
To: ''
Cc: ''
Subject: Specifying explicit file lists (FileSets) in MatchingTasks


I'm planning to build my project from an explicit file list as opposed to
using pattern matching for the .java or .jsp files. FileSets seem like the
natural place to turn, specifying a pattern for each file I want included.
The issue I'm running into is that if the pattern doesn't match (because the
file is not there) the task proceeds happily. I need it to fail because the
file is absent. It is not feasible to check for the existence of every file
with a task. 

Is there another option that I've missed? I'm considering adding support to
MatchingTask so that it can take a java.util.jar.Manifest file (the list
file format I'm using) in addition to a pattern file(s). One could still add
includes and excludes only they would match against the manifest list. The
MatchingTask "dir" attribute would provide the base directory for the
manifest files. I can see how the validation could be a configurable option,
if one is generating some of the items in the list. 

In some experiments with this feature, processing lists this way seems
faster than scanning directories and checking if patterns should be


David Dabbs 

View raw message