This Antlib contains tasks and resources that provide compression/uncompression and archival/unarchival capabilities based on Apache Commons Compress. Using Apache Commons Compress 1.14 this Antlib supports gzip, bzip2, lzma standalone, xz, .Z, DEFLATE, Snappy, LZ4, Brotli and pack200 compression and ar, arj, cpio, 7z, Unix dump, tar and zip archives. Support for arj, .Z, Brotli and dump is read-only. 7z can only be used on filesystem resources.
Reading AR archives from non-filesystem resources currently fails for reasons that haven't been investigated, yet. Most likely the problem is within Apache Commons Compress.
This Antlib contains the following tasks:
This Antlib contains the following resources:
This Antlib contains the following conditions that work on the
      *entry-resources of this Antlib as well as their
      counterparts in Ant itself:
This Antlib requires Apache Ant 1.8.0 or higher, Apache Commons Compress 1.14 or higher and Java7 or higher.
In order to use LZMA, XZ or most of the 7z support the XZ for Java version 1.6 or later is required.
In order to use Brotli the Brotli dec library verision 0.1.2 or later is required.
If you are building the Antlib from sources, run
      the antlib target and you'll get a
      file ant-compress-VERSION.jar.  If you've
      downloaded a binary release, you are already there.
In order to use the Antlib, you can either
      use taskdef or rely on Ant's autodiscovery by using
      an XML namespace and the Antlib's URI.  The taskdef
      approach allows you to specify a custom classpath while you must
      make sure Ant finds the Antlib itself as well as Apache Commons
      Compress - either because it is in a well known place like
      $ANT_HOME/lib or using the -lib
      command line option - when using autodiscovey.
taskdef approachBefore you can use any of the tasks or resources you must use
      a taskdef task like:
      <taskdef 
        uri="antlib:org.apache.ant.compress"
        resource="org/apache/ant/compress/antlib.xml">
        <classpath>
          <pathelement location="YOUR-PATH-TO/ant-compress-VERSION1.jar"/>
          <pathelement location="YOUR-PATH-TO/commons-compress-VERSION2.jar"/>
          <!-- optional dependencies -->
          <pathelement location="YOUR-PATH-TO/xz-VERSION3.jar"/>
          <pathelement location="YOUR-PATH-TO/dec-VERSION4.jar"/>
        </classpath>
      </taskdef>
    And later use something like:
      <comp:tar
        xmlns:tar="antlib:org.apache.ant.compress"
        ...
    
      <project
        xmlns:comp="antlib:org.apache.ant.compress"
        ...
    And later use something like:
          <comp:tar
            ...