ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zart Colwing <>
Subject Re: how to copy a bunch of *unrelated* files ?
Date Thu, 28 Mar 2002 23:43:01 GMT

On jeudi, mars 28, 2002, at 09:56 , Diane Holt wrote:

> As Dominique pointed out, these aren't unrelated files -- they all 
> have a
> common root (${user.home}/Developer/Java). I'm not sure why she went 
> with
> <patternset>, nor should the common root have been included as part of 
> the
> pattern, or where the "ID1" ref came from -- but other than that... :)
I supposed that it was really a tough race between the two of you ;)

Hum, if I may, I'd like to insist to point out that the files *are 
indeed unrelated* in the sense that they are not inseparable sub-parts 
of a superior object. Each one of these file could live its own life 
independently of all others. They *appears* to be related because they 
are organized under a common directory but it could reasonably be 
otherwise (well on unix system you always have the common root but its 
maybe pushing a little to far).

So we have:
- "filset" convey the idea of a bunch of *related* files found under a 
common directory (ideal to represent source files).
- "path" on the other hand convey the idea of a list of *unrelated and 
independent* files that could be anywhere and that are generally 
referenced using an absolute path - or relatively to the project basedir.

Note also that a "path", being a more generic structure,  can embed a 
"fileset" so it is possible, using a "path", to reference both 
scattered, unrelated, files and bunchs of related files grouped under a 
common directory. This is a flexibility that "fileset" doesn't offer.

These reflection make me come to the thought that some Ant tasks that 
use a "fileset" could indeed use a "path" for maximum flexibility. The 
Copy task is a blatant example.

Maybe this "path"/"fileset" dichotomy could be re-examined for Ant 2 (I 
hope it will).

> Here's the shorter version:
>  <fileset id="ext_libs.fs" dir="${user.home}/Developer/Java">
>    <include name="jaf-1.0.1/lib/activation.jar"/>
>    <include name="javamail-1.2/lib/mailapi.jar"/>
>    <include name="javamail-1.2/lib/smtp.jar"/>
>    <include name="regex4j/regex4j.jar"/>
>    <include name="log4j-1.2beta4/dist/lib/log4j-1.2beta4.jar"/>
>  </fileset>
>  <path id="ext_libs.path">
>    <fileset refid="extlibs.fs" />
>  </path>
> Diane
Nice job, I'll use that as it seam to be the only elegant solution 
available right now.


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

View raw message