<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.