ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <fzli...@omnytex.com>
Subject Copy task that excludes directories
Date Thu, 25 Aug 2005 19:13:52 GMT
Hi all,

I'm trying to set up a task that will copy an entire directory tree
starting at a given root directory, but which will EXCLUDE certain
directories in the tree.

I started with the entire copy:

<target name="test">
  <delete dir="${ddir}/project" />
  <mkdir dir="${ddir}/project" />
  <copy toDir="${ddir}/project">
    <fileset dir="${root}">
      <exclude name="**/*src*" />
    </fileset>
  </copy>
</target>

Basically, I'm trying to exclude a single directory: src in WEB-INF (I'm
copying a webapp obviously).

This part was easy, and it works.  But, I can't seem to figure out the
exclusion... I can't use a <dirset> in <copy> apparently, and the
<copydir> task is deprecated.  I don't see a way to do it with the <copy>
task alone.  Any ideas?  Thanks!

Frank

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message