ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harkness, David" <>
Subject RE: stupid copy question
Date Fri, 25 Jun 2004 21:52:33 GMT
Jeffrey Bacon wrote:
> ok, so I have directory with 'src' and 'res' subdirectories.
> I want to
> copy the src & res dirs to the temp directory preserving
> thier directory
> structure but using a inclues/excludes pattern to onle copy certain
> files (ex. *.java & *.png).  I though the below would do that but it
> doesn't see to copy anything or create the temp/src and temp/res dirs.
> <copy preservelastmodified="true"
>        todir="${basedir}/${temp.dir}"
>        overwrite="yes"
>        failonerror="true">
>      <fileset dir="${basedir}/${fromDir}"
>               includes="${src.dir}/${src.includes}"
>               excludes="${src.dir}/${src.excludes}" />
>      <fileset dir="${basedir}/${fromDir}"
>               includes="${res.dir}/${res.includes}"
>               excludes="${res.dir}/${res.excludes}" />
> </copy>

What does src.includes contain? Is it like "*.java"? If so, then only
Java files stored at the root of src.dir will will be copied -- none of
the ones stored in subdirectories. For that, you'll want the includes to
end up looking like


** denotes any number of intervening subdirectories, including none.
Also, you can't set src.includes to something like "*.java *.png". For
that, you'll need separate include lines (prefered) or I believe you can
use "src/**/*.java src/**/*.png", but I'm not sure.

David Harkness
Sr. Software Engineer
Sony Pictures Digital Networks
(310) 482-4756

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

View raw message