I'm running an Ant zip task to zip the whole contents of a directory on Unix systems:
<zip destfile="${deploy}/test.zip">
<zipfileset dir="/home/mydir" />
</zip>
After the zip is created, and checking the contents, I can see that some config files, Visual Studio specific files and others like the Mac OS .DS_STORE file are left out the zip.
Is there any rule ant follows to decide what files will not be included?
I need to know in advance since I need to create a list of existing files on that directory before zipping (currently using Java). Right now I'm excluding all directories and hidden files (using File.isHidden() and isDirectory() methods) , but the list is still getting some of the file Ant lefts out (for example, vssver.scc
From the docs, or use Konstantin's solution to inspect your particular installation:
There are a set of definitions that are excluded by default from all directory-based tasks. As of Ant 1.8.1 they are:
**/*~ **/#*# **/.#* **/%*% **/._* **/CVS **/CVS/** **/.cvsignore **/SCCS **/SCCS/** **/vssver.scc **/.svn **/.svn/** **/.DS_Store
Ant 1.8.2 adds the folllowing default excludes:
**/.git **/.git/** **/.gitattributes **/.gitignore **/.gitmodules **/.hg **/.hg/** **/.hgignore **/.hgsub **/.hgsubstate **/.hgtags **/.bzr **/.bzr/** **/.bzrignore
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With