ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: file lists
Date Mon, 30 Oct 2000 12:40:44 GMT
>>>>> "DS" == David Sacher <> writes:

 DS> I have a directoy of libraries (lib), but I don't want to use all
 DS> of them in the project I'm building. So instead of copying all
 DS> the libraries to the delployment directory by

 DS> <copydir src="lib" dest="${deploy.home}/WEB-INF/lib"/>

 DS> i want only some of them. I obviously can use <copyfile> for
 DS> that.

No, use a nested fileset and copy. The files you want to copy can be
specified in a patternset (and later be reused in a classpath as

<patternset id="myfiles">
  <include name="**/file1.jar" />
  <include name="**/file2.jar" />

<target ...>
  <copy todir="${deploy.home}/WEB-INF/lib">
    <fileset dir="lib">
      <patternset refid="myfiles" />

<target ...>
  <java ...>
      <pathelement ... />
      <fileset dir="lib">
        <patternset refid="myfiles" />

Hope this helps


View raw message