Is it possible to exclude a single directory from a fileset?
Posted: Thu Dec 11, 2014 11:46 am
I have a process that zips up a folder on a network file share and I'd like it to exclude a single folder (and it's contents) from the zip. I have the fileset set to recursive so it will collect other file contents though when I try to exclude a single folder (I've tried ".git", "*.git*", or "*git*"), it seems to be performing a filename exclusion and includes the entire directory in the zip.
Code: Select all
As I fallback, I can copy the directory to a workspace, delete the .git folder, and then zip up what's left, though I was hoping to perform this within the fileset as the include/exclude features seem to imply that something like this should be possible. Note that the other file/folder names are dynamic so I can't just set a series of INCLUDEs for every other file/directory. <fileset dir="//servername/development/projects" recursive="true">
<wildcardFilter>
<exclude pattern=".git" />
</wildcardFilter>
</fileset>