archives

This resource collection accepts an arbitrary number of nested resources and assumes that all those resources must be archives of one of the supported formats. The resources returned by <archives> are the contents of the nested archives.

archives doesn't support any attributes.

Parameters specified as nested elements

<archives> has four nested elements <ars>, <cpios>, <zips> and <tars> that are unions themselves, i.e. they accept arbitrary many resource(collection)s as nested elements.

The nested resources of <zips> are treated as ZIP archives, the nested resources of <tars> as TAR archives and so on.

Examples

Copies all files from all jars that are on the classpath to ${target}.

    <copy todir="${target}">
      <cmp:archives xmlns:cmp="antlib:org.apache.ant.compress">
        <zips>
          <restrict>
            <path path="${java.class.path}"/>
            <name name="*.jar"/>
          </restrict>
        </zips>
      </cmp:archives>
    </copy>