Title: RE: Specifying explicit file lists (FileSets) in MatchingTasks
Thanks - that is exactly what I wanted. The documentation is sometimes very dense/terse, and could use many more examples. There are also some inconsistencies - i.e. in the PatternSets section, it says the attribute name is "includes", but the only example uses "include" with no 's' at the end. Not sure if both work or if this is just wrong. And it would be nice if each examples section showed the usage for each attribute listed, which would have helped me here.
-----Original Message-----
From: David Dabbs [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 1:58 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Specifying explicit file lists (FileSets) in MatchingTasks

Steve,

You should be able to specify your "includesfile" in a PatternSet. Such as:

    <patternset includesfile="foo.txt" />

Check out the Ant docs for PatternSet and FileSet.


David Dabbs
               

-----Original Message-----
From: Steve Donie [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 1:25 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Specifying explicit file lists (FileSets) in MatchingTasks


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:

com\lgc\app\classname.class

The "RMICManifest.txt" file has lines with classnames:

com.lgc.app.classname

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.

Thanks

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




Hello,
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 included.

Thanks,
David Dabbs
       

Reply via email to