Archive Entries

For each of the supported archiving formats there is a correspondig entry resource that represents a single entry in such an archive.

All of these resources need to know the archive the entry should be read from, it can be specifed as either the archive attribute or a nested single-element resource collection.

The entry types share the following set of attributes:

Attribute Description Required
archive The archive containing this resource Yes, unless a nested resource collection has been specified.
name The name of the archived resource Yes
encoding The encoding of filenames inside the archive No; platform default used if unspecified. Currently ignored by all but zipentry

arentry

An archive entry representing an entry in a AR archive.

Examples

<cmp:arentry xmlns:cmp="antlib:org.apache.ant.compress"
    name="some-file.txt">
  <file file="some-archive.ar"/>
</cmp:arentry>

Represents the entry named some-file.txt in archive some-archive.ar.

cpioentry

An archive entry representing an entry in a CPIO archive.

Examples

<cmp:cpioentry xmlns:cmp="antlib:org.apache.ant.compress"
    name="some-file.txt">
  <file file="some-archive.cpio"/>
</cmp:cpioentry>

Represents the entry named some-file.txt in archive some-archive.cpio.

dumpentry

Since Apache Compress Antlib 1.1.

An archive entry representing an entry in a Unix dump archive.

Examples

<cmp:dumpentry xmlns:cmp="antlib:org.apache.ant.compress"
    name="/some-file.txt">
  <file file="some-archive.dump"/>
</cmp:dumpentry>

Represents the entry named /some-file.txt in archive some-archive.dump.

tarentry

An archive entry representing an entry in a TAR archive.

Examples

<cmp:tarentry xmlns:cmp="antlib:org.apache.ant.compress"
    name="some-file.txt">
  <file file="some-archive.tar"/>
</cmp:tarentry>

Represents the entry named some-file.txt in archive some-archive.tar.

zipentry

An archive entry representing an entry in a ZIP archive.

Unlike its counterpart in Ant's core this Antlib's zipentry can work on archives that are not file system resources.

Examples

<cmp:zipentry xmlns:cmp="antlib:org.apache.ant.compress"
    name="some-file.txt">
  <file file="some-archive.zip"/>
</cmp:zipentry>

Represents the entry named some-file.txt in archive some-archive.zip.