blob: ee317688a20c23b6a90dc289c2357a5b06c3efa4 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!--
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-Type" CONTENT="text/html; charset=ISO-8859-1">
<script type="text/javascript">var xookiConfig = {level: 1};</script>
<script type="text/javascript" src="../xooki/xooki.js"></script>
</head>
<body>
<textarea id="xooki-source">
Constructs an ant path consisting of artifacts in ivy cache (or origin location with depending on useOrigin setting) for a resolved module configuration.
This is a [[ant:postresolvetask post resolve task]], with all the behaviour and attributes common to all post resolve tasks.
Please prefer the use of retrieve + standard ant path creation, which make your build more independent from ivy (once artifacts are properly retrieved, ivy is not required any more).
Built path is registered in ant with a given id, and can thus be used like any other ant path using refid.
<span class="since">since 1.4</span> The behaviour is like this when 'useOrigin=true':
<ul>
<li>if the artifact is not local, the location from within the cache is used</li>
<li>if the artifact is a local artifact, it's original location is used</li>
</ul>
Note that if resolve has been called separately, the copy to the cache may have occur normally if useOrigin was not set when calling [[ant:resolve]]. If resolve has not been called, it will be called automatically with useOrigin set to the value specified on this task.
<table class="ant">
<thead>
<tr><th class="ant-att">Attribute</th><th class="ant-desc">Description</th><th class="ant-req">Required</th></tr>
</thead>
<tbody>
<tr><td>pathid</td><td>the id to reference the built path</td>
<td>Yes</td></tr>
<tr><td>conf</td><td>a comma separated list of the configurations to put in the created path</td>
<td>No. Defaults to the configurations resolved by the last resolve call, or * if no resolve was explicitly called</td></tr>
<tr><td>type</td><td>comma separated list of artifact types to accept in the path, * for all (<span class="since">since 1.2</span>)</td><td>No. Defaults to *</td></tr>
<tr><td>useOrigin</td><td>true to use original location of local artifacts, false to use only cache locations <span class="since">since 1.4</span></td>
<td>No. Defaults false</td></tr>
<tr><td>settingsRef</td><td><span class="since">(since 2.0)</span> A reference to the ivy settings that must be used by this task</td><td>No, 'ivy.instance' is taken by default.</td></tr>
</tbody>
</table>
<h1>Examples</h1>
<code type="xml">
<cachepath pathid="default.classpath" conf="default" />
</code>
Construct an ant path composed of all artifacts being part of the default configuration obtained through the last resolve call.
<hr/>
<code type="xml">
<cachepath pathid="default.classpath" conf="default" useOrigin="true" />
</code>
Same as before but will use the original location for local artifacts, and the cache location for other artifacts.
<hr/>
<code type="xml">
<ivy:cachepath organisation="emma" module="emma" revision="2.0.4217" inline="true" conf="ant" pathid="emma.classpath"/>
<taskdef resource="emma_ant.properties" classpathref="emma.classpath" />
</code>
Resolves the emma module in version 2.0.4217, constructs an ant path with the corresponding artifacts, and then define the emma tasks using this path.
</textarea>
<script type="text/javascript">xooki.postProcess();</script>
</body>
</html>