From 9cc0ee59d9563ac9876904a4d54eab412913c90a Mon Sep 17 00:00:00 2001
From: Magesh Umasankar 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.
${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">