Blog Compass Lite 2.0 - personal blog About Me Album Bookmarks

Friday, February 10, 2006

Excluding sub-directory in Ant copy task

Google Groups :

Problem Scenario:

During ant <copy> task, certain sub-directory is to be excluded from the source directory.


Supposed /gen sub-directory is to be excluded, an example is as follow:

<fileset dir="src/dao" excludes="**/gen/**" includes="**/*.xml"/>

/gen/** is used instead of /gen/* as  sub-directories within /gen is represented as ** instead of *