<tar>
Purpose/Function
Create a tape archive (tar) file from the given inputs. Wraps the UNIX shell command.
Attributes
NAME |
TYPE |
DEFAULT VALUE |
DESCRIPTION |
---|---|---|---|
tarPath |
|
required |
path of the tar file to create |
tarBaseDir |
|
|
directory in which to execute the command (defaults to user dir) |
sourceExpression |
|
required if there are no paths |
a Unix-like path expression (must be relative to base) |
paths |
|
required if no path expression set |
list of path strings (can be file URIs or paths) |
verbose |
|
|
add "v" to the command |
zip |
|
|
add "z" to the command |
altShellPaths |
|
|
additional places to look for the shell executable on this host (defaults are /bin/sh and /usr/bin/sh) |
Elements
TAG |
TYPE |
COUNT |
DESCRIPTION |
---|---|---|---|
|
|
0:N |
a path to add to the path list |
|
|
0:N |
a path to add to the alternate shell path list |
ReturnValues
None.
Examples
... <declare name="uriList"> <list> <value>file:/tmp/source/a.txt</value> <value>file:/tmp/source/b.txt</value> <value>file:/tmp/source/c.txt</value> </list> </declare> <tar tarPath="/tmp/ogre.tar.gz" tarBaseDir="/tmp/arossi" sourceExpression="*" zip="true"/> <tar tarPath="/tmp/ogre2.tar.gz" tarBaseDir="/tmp/source"> <path>a.txt</path> <path>b.txt</path> <path>c.txt</path> </tar> <!-- NOTE: be careful here ... --> <tar tarPath="/tmp/ogre3.tar.gz" paths="${uriList}/> ...
NOTE
The paths of the referenced source URIs given in the third example will be ignored (only the names of the files will added to the list); hence, this task will be looking for the three named files in the user's current directory, which is probably a mistake; what the user more than likely should do here is set tarBaseDir to "/tmp/source", as in the second example.)