Name

tar

Synopsis

Creates a tar archive.

Attributes

basedir (all, File, N)

Specifies the base directory from which to add files to the tar file.

defaultexcludes (all, boolean, N)

Determines whether to use default excludes, as described in Chapter 4 under “FileSet DataType.” Defaults to true.

excludes (all, String, N)

A comma-separated list of file patterns to exclude. These are in addition to the default excludes.

excludesfile (all, File, N)

The name of a file containing one exclude pattern per line.

includes (all, String, N)

A comma-separated list of file patterns to include.

includesfile (all, File, N)

The name of a file containing one include pattern per line.

longfile (1.3, 1.4, String, N)

Controls handling of files with long (>100 character) filenames. Legal values are truncate, fail, warn, omit, and gnu. Defaults to warn.

tarfile (all, File, Y)

The tar file to create.

Content

0..n nested patternset elements: <exclude>, <include>, <patternset> (all); <excludesfile>, <includesfile> (1.4)

Used in place of their corresponding attributes, these specify the set of included and excluded source files.

0..n nested <tarfileset> elements (1.3, 1.4)

Each support all fileset attributes and content (includes, excludes, etc.), as well as the following additional attributes:

mode (1.3, 1.4, String, N)

A 3-digit octal string specifying user, group, and other modes.

username (1.3, 1.4, String, N)

The username for the tar entry.

group (1.3, 1.4, String, N)

The group name for the tar entry.

Example Usage

Creates ...

Get Ant: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.