Return-Path: Delivered-To: apmail-ant-notifications-archive@locus.apache.org Received: (qmail 48233 invoked from network); 18 Dec 2007 08:41:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Dec 2007 08:41:29 -0000 Received: (qmail 31910 invoked by uid 500); 18 Dec 2007 08:41:18 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 31884 invoked by uid 500); 18 Dec 2007 08:41:18 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 31874 invoked by uid 99); 18 Dec 2007 08:41:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2007 00:41:18 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2007 08:41:14 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B768D1A984E; Tue, 18 Dec 2007 00:41:05 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r605137 - /ant/core/trunk/docs/manual/CoreTasks/tar.html Date: Tue, 18 Dec 2007 08:41:05 -0000 To: notifications@ant.apache.org From: jhm@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071218084105.B768D1A984E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jhm Date: Tue Dec 18 00:41:04 2007 New Revision: 605137 URL: http://svn.apache.org/viewvc?rev=605137&view=rev Log: examples: - tar: tarfile is deprecated since 1.5 - gzip: zipfile is not deprecated, but use of common name - fix attribute names (Bug 44082) Modified: ant/core/trunk/docs/manual/CoreTasks/tar.html Modified: ant/core/trunk/docs/manual/CoreTasks/tar.html URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/tar.html?rev=605137&r1=605136&r2=605137&view=diff ============================================================================== --- ant/core/trunk/docs/manual/CoreTasks/tar.html (original) +++ ant/core/trunk/docs/manual/CoreTasks/tar.html Tue Dec 18 00:41:04 2007 @@ -71,6 +71,11 @@ destfile + the tar-file to create. + Yes + + + destfile the tar-file to create. Yes @@ -156,15 +161,16 @@

Examples

-<tar tarfile="${dist}/manual.tar" basedir="htdocs/manual"/>
-<gzip zipfile="${dist}/manual.tar.gz" src="${dist}/manual.tar"/>
+<tar destfile="${dist}/manual.tar" basedir="htdocs/manual"/> +<gzip destfile="${dist}/manual.tar.gz" src="${dist}/manual.tar"/>

tars all files in the htdocs/manual directory into a file called manual.tar in the ${dist} directory, then applies the gzip task to compress it.

+
 <tar destfile="${dist}/manual.tar"
-      basedir="htdocs/manual"
-      excludes="mydocs/**, **/todo.html"
+     basedir="htdocs/manual"
+     excludes="mydocs/**, **/todo.html"
 />

tars all files in the htdocs/manual directory into a file called manual.tar in the ${dist} directory. Files in the directory mydocs, @@ -183,7 +189,6 @@ <include name="*.html"/> </tarfileset> </tar> -

Writes the file docs/readme.txt as /usr/doc/ant/README into the archive. All @@ -193,10 +198,9 @@ /usr/doc/ant/index.html to the archive.

-
 <tar longfile="gnu"
-     destfile="${dist.base}/${dist.name}-src.tar" >
+     destfile="${dist.base}/${dist.name}-src.tar">
   <tarfileset dir="${dist.name}/.." mode="755" username="ant" group="ant">
     <include name="${dist.name}/bootstrap.sh"/>
     <include name="${dist.name}/build.sh"/>
@@ -208,7 +212,6 @@
   </tarfileset>
 </tar>
 
-

This example shows building a tar which uses the GNU extensions for long paths and where some files need to be marked as executable (mode 755) and the rest are use the default mode (read-write by owner). The first @@ -228,23 +231,24 @@ of a directory, so ${dist.name} is a valid path relative to ${dist.name}/...

+
-<tar dest="release.tar.gz" compress="gzip">
+<tar destfile="release.tar.gz" compression="gzip">
   <zipfileset src="release.zip"/>
 </tar>
 
-

Re-packages a ZIP archive as a GZip compressed tar archive. If Unix file permissions have been stored as part of the ZIP file, they will be retained in the resulting tar archive.

-

Note: - Please note the tar task creates a tar file, it does not append - to an existing tar file. The existing tar file is replaced instead. - As with most tasks in Ant, the task only takes action if the output - file (the tar file in this case) is older than the input files, or - if the output file does not exist. -

+ +

Note: + Please note the tar task creates a tar file, it does not append + to an existing tar file. The existing tar file is replaced instead. + As with most tasks in Ant, the task only takes action if the output + file (the tar file in this case) is older than the input files, or + if the output file does not exist. +