blob: 3ced66d97834aebaef289804c3a3157734fb310e [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Archives</title>
</head>
<body>
<h2>archives</a></h2>
<p>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 <code>&lt;archives&gt;</code> are the contents of the nested
archives.</p>
<p><em>archives</em> doesn't support any attributes.</p>
<h3>Parameters specified as nested elements</h3>
<p><code>&lt;archives&gt;</code> has four nested
elements <code>&lt;ars&gt;</code>, <code>&lt;cpios&gt;</code>,
<code>&lt;zips&gt;</code> and
<code>&lt;tars&gt;</code> that are <a href="http://ant.apache.org/manual/CoreTypes/resources.html#union">unions</a>
themselves, i.e. they accept arbitrary many resource(collection)s
as nested elements.</p>
<p>The nested resources of &lt;zips&gt; are treated as ZIP archives,
the nested resources of &lt;tars&gt; as TAR archives and so on.</p>
<h4>Examples</h4>
<p>Copies all files from all jars that are on the classpath
to <code>${target}</code>.</p>
<pre>
&lt;copy todir="${target}"&gt;
&lt;cmp:archives xmlns:cmp="antlib:org.apache.ant.compress"&gt;
&lt;zips&gt;
&lt;restrict&gt;
&lt;path path="${java.class.path}"/&gt;
&lt;name name="*.jar"/&gt;
&lt;/restrict&gt;
&lt;/zips&gt;
&lt;/cmp:archives&gt;
&lt;/copy&gt;
</pre>
</body>
</html>