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 |
An archive entry representing an entry in a AR archive.
<cmp:arentry xmlns:cmp="antlib:org.apache.ant.compress" name="some-file.txt"> <file file="some-archive.ar"/> </cmp:arentry>
Since Apache Compress Antlib 1.3.
An archive entry representing an entry in a ARJ archive.
<cmp:arjentry xmlns:cmp="antlib:org.apache.ant.compress" name="some-file.txt"> <file file="some-archive.arj"/> </cmp:arjentry>
Represents the entry named some-file.txt in archive some-archive.arj.
An archive entry representing an entry in a CPIO archive.
<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.
Since Apache Compress Antlib 1.1.
An archive entry representing an entry in a Unix dump archive.
<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.
Since Apache Compress Antlib 1.3.
An archive entry representing an entry in a 7z archive.
<cmp:sevenzentry xmlns:cmp="antlib:org.apache.ant.compress" name="some-file.txt"> <file file="some-archive.7z"/> </cmp:sevenzentry>
Represents the entry named some-file.txt in archive some-archive.7z.
An archive entry representing an entry in a TAR archive.
<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.
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.
<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.