Browse Source

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
master
Magesh Umasankar 23 years ago
parent
commit
9cc0ee59d9
1 changed files with 38 additions and 0 deletions
  1. +38
    -0
      docs/manual/CoreTasks/tar.html

+ 38
- 0
docs/manual/CoreTasks/tar.html View File

@@ -136,6 +136,20 @@ attributes
are prefixed with that path in the archive.</td> are prefixed with that path in the archive.</td>
<td align="center" valign="top">No</td> <td align="center" valign="top">No</td>
</tr> </tr>
<tr>
<td valign="top">fullpath</td>
<td valign="top">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.</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">preserveLeadingSlashes</td>
<td valign="top">Indicates whether leading `/'s should
be preserved in the file names. Default is <code>false</code>.</td>
<td align="center" valign="top">No</td>
</tr>
</table> </table>


<h3>Examples</h3> <h3>Examples</h3>
@@ -152,6 +166,30 @@ it.</p>
in the <code>${dist}</code> directory. Files in the directory <code>mydocs</code>, in the <code>${dist}</code> directory. Files in the directory <code>mydocs</code>,
or files with the name <code>todo.html</code> are excluded.</p> or files with the name <code>todo.html</code> are excluded.</p>


<pre>
&lt;tar destfile=&quot;${basedir}/docs.tar&quot;&gt;
&lt;tarfileset dir=&quot;${dir.src}/docs&quot;
fullpath=&quot;/usr/doc/ant/README&quot;
preserveLeadingSlashes=&quot;true&quot;&gt;
&lt;include name=&quot;readme.txt&quot;/&gt;
&lt;/tarfileset&gt;
&lt;tarfileset dir=&quot;${dir.src}/docs&quot;
prefix=&quot;/usr/doc/ant&quot;
preserveLeadingSlashes=&quot;true&quot;&gt;
&lt;include name=&quot;*.html&quot;/&gt;
&lt;/tarfileset&gt;
&lt;/tar&gt;</pre>

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


<pre>&lt;tar longfile=&quot;gnu&quot; <pre>&lt;tar longfile=&quot;gnu&quot;
destfile=&quot;${dist.base}/${dist.name}-src.tar&quot; &gt; destfile=&quot;${dist.base}/${dist.name}-src.tar&quot; &gt;
&lt;tarfileset dir=&quot;${dist.name}/..&quot; mode=&quot;755&quot; username=&quot;ant&quot; group=&quot;ant&quot;&gt; &lt;tarfileset dir=&quot;${dist.name}/..&quot; mode=&quot;755&quot; username=&quot;ant&quot; group=&quot;ant&quot;&gt;


Loading…
Cancel
Save