TarTask creates a tarball from a fileset or directory.
Table C.124: Attributes
|Base directory to tar (if no fileset specified, entire directory contents will be included in tar)||none||No|
|Type of compression to use (gzip, bzip2, lzma2, none)||none||No|
|If set to ||No|
|How to handle long files, those with a path > 100 chars. Allowable
values are: ||warn||No|
|File path prefix to use when adding files to archive||none||No|
files are not replaced if they are already present in the archive.
using basedir and fileset simultaneously can result in strange contents in the archive.
<tar destfile="phing.tar"> <fileset dir="."> <include name="**/**" /> </fileset> </tar>
The above example uses a fileset to determine which files to include in the archive.
<tar destfile="phing.tar.gz" basedir="." compression="gzip"/>
The second example uses the basedir attribute to include the contents of that directory (including subdirectories) in the archive, compressing the archive using gzip.