From 9cc0ee59d9563ac9876904a4d54eab412913c90a Mon Sep 17 00:00:00 2001 From: Magesh Umasankar Date: Mon, 4 Feb 2002 21:50:42 +0000 Subject: [PATCH] Document new attributes. PR: 5874 Submitted by: Stefan Heimann (mail@stefanheimann.net) git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271141 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/CoreTasks/tar.html | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/manual/CoreTasks/tar.html b/docs/manual/CoreTasks/tar.html index e8359f21a..d846ec01e 100644 --- a/docs/manual/CoreTasks/tar.html +++ b/docs/manual/CoreTasks/tar.html @@ -136,6 +136,20 @@ attributes are prefixed with that path in the archive. No + + fullpath + If the fullpath attribute is set, the file in the fileset + is written with that path in the archive. The prefix attribute, if specified, is + ignored. It is an error to have more than one file specified in + such a fileset. + No + + + preserveLeadingSlashes + Indicates whether leading `/'s should + be preserved in the file names. Default is false. + No +

Examples

@@ -152,6 +166,30 @@ it.

in the ${dist} directory. Files in the directory mydocs, or files with the name todo.html are excluded.

+
+<tar destfile="${basedir}/docs.tar">
+  <tarfileset dir="${dir.src}/docs"
+              fullpath="/usr/doc/ant/README"
+              preserveLeadingSlashes="true">
+    <include name="readme.txt"/>
+  </tarfileset>
+  <tarfileset dir="${dir.src}/docs"
+              prefix="/usr/doc/ant"
+              preserveLeadingSlashes="true">
+    <include name="*.html"/>
+  </tarfileset>
+</tar>
+ +

+ Writes the file docs/readme.txt as + /usr/doc/ant/README into the archive. All + *.html files in the docs directory are + prefixed by /usr/doc/ant, so for example + docs/index.html is written as + /usr/doc/ant/index.html to the archive. +

+ +
<tar longfile="gnu"
      destfile="${dist.base}/${dist.name}-src.tar" >
   <tarfileset dir="${dist.name}/.." mode="755" username="ant" group="ant">