I have an ant target for creating zip like this –
<zip destfile="${dist}/myzip.zip">
<zipfileset dir="docs/manual" prefix="docs/userguide"/>
</zip>
This basically creates archive myzip.zip with all the files and directories under docs/manual prefixed with docs/userguide in the archive.
But I don’ want to include all the directories under docs/manual to be copied into the archive,
I have a directory called old under docs/manual which I want to exclude…How to achieve this?
From the ZipFileSet reference page
So see FileSet for reference.
This is how you do it:
or inline as attribute:
Update: Using wildcards now instead of simple name.