Apache Ant Zip Task
Ant Zip task is used to create zip file. basedir attribute is used to refer source of files from where zip file is created. We can use exclude attribute to exclude the file from being zipped.
It makes a implicit fileset and supports various nested elements including <fileset>, <include>, <exclude> and <patternset>.
Apache Ant Zip Task Attributes
Let's see some examples to create a zipfile.
Apache Ant Zip Task Example
Create a zip file manual.zip by collecting all the files from javatpoin/java directory.
If zip file exist, it update zip file.
We can exclude file by specifying names of files using excludes attribute.