<tar>

The <tar> task enables you to create tar archives.

Some care should be taken when using the <tar> task. First, be careful not to specify the same file more than once because it will be included in the archive twice. Second, you should be aware of the slight complication when dealing with files that have path lengths of greater than 100 characters. This is due to the fact that earlier versions of tar did not support paths of this length. To manage this, you have five options, as specified by the longfile attribute:

  • Truncate— Paths of greater than 100 characters will be truncated to a 100-character limit. However, this means a loss of path information, which is usually, if not always, undesirable.

  • Fail— The task will fail if a file with ...

Get Ant Developer’s Handbook 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.