mirror of https://github.com/apache/ant-ivy
99 lines
5.6 KiB
HTML
99 lines
5.6 KiB
HTML
<!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">
|
|
<b>Tag:</b> cacheDefaults
|
|
|
|
<span class="since">since 2.0</span> Configures defaults values for Ivy cache(s).
|
|
|
|
Ivy cache is composed of two different parts:
|
|
<ul>
|
|
<li>the repository cache</li>
|
|
The repository cache is where Ivy stores data downloaded from module repositories, along with some meta information concerning these artifacts, like their original location.
|
|
This part of the cache can be shared if you use an ad hoc [[configuration/lock-strategies lock strategy]].
|
|
<li>the resolution cache</li>
|
|
This part of the cache is used to store resolution data, which is used by Ivy to reuse the results of a resolve process.
|
|
This part of the cache is overwritten each time a new resolve is performed, and should never be used by multiple processes at the same time.
|
|
</ul>
|
|
|
|
While there is always only one resolution cache, you can define multiple repository cache, each [[configuration/resolvers resolver]] being able to use a separate cache.
|
|
|
|
This element only define default values for repository caches, used by all repository caches when not overridden. To define repository cache instances, use the cache element.
|
|
|
|
Caches usually relies on a base directory, where all files stored in the cache go.
|
|
<strong>This base directory should not point to a directory used as a repository!</strong>
|
|
|
|
Here are some details on the available settings attributes:
|
|
<em>defaultBasedir</em> is the default base directory where the resolution and repository caches will be stored.
|
|
It usually points to a directory in the local filesystem.
|
|
This is useful only if you want to use the same default basedir for both the resolution and the repository caches. Otherwise we recommend using <em>repositoryDir</em> and <em>resolutionDir</em> instead.
|
|
|
|
<em>repositoryDir</em> and <em>resolutionDir</em> are used to configure the base location of the repository and resolution parts of the cache.
|
|
|
|
<em>repositoryIvyPattern</em> and <em>repositoryArtifactPattern</em> are used to configure the default way Ivy stores ivy files and artifacts in repository cache(s). Usually you do not have to change this, unless you want to use the cache directly from another tool, which is not recommended. These patterns are relative to the repository cache base directory.
|
|
|
|
<em>lockStrategy</em> is used to define the default lock strategy to use by repository cache.
|
|
|
|
<h1>Attributes</h1>
|
|
<table class="ivy-attributes">
|
|
<thead>
|
|
<tr><th class="ivy-att">Attribute</th><th class="ivy-att-desc">Description</th><th class="ivy-att-req">Required</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr><td>defaultBasedir</td><td>a path to a directory to use as as default base directory for both resolution and repository caches.</td>
|
|
<td>No, defaults to .ivy2/cache in user home</td></tr>
|
|
<tr><td>resolutionDir</td><td>the path of the directory to use to put all resolution cache data</td>
|
|
<td>No, defaults to defaultBasedir</td></tr>
|
|
<tr><td>repositoryDir</td><td>the path of the directory to use to put all repository cache data</td>
|
|
<td>No, defaults to defaultBasedir</td></tr>
|
|
<tr><td>repositoryIvyPattern</td><td>a pattern to indicate where ivy files should be put in the repository cache</td>
|
|
<td>No, defaults to [organisation]/[module]/ivy-[revision].xml</td></tr>
|
|
<tr><td>repositoryArtifactPattern</td><td>a pattern to indicate where artifact files should be put in repository cache</td>
|
|
<td>No, defaults to [organisation]/[module]/[type]s/[artifact]-[revision].[ext]</td></tr>
|
|
<tr><td>lockStragegy</td><td>the name of the default [[configuration/lock-strategies lock strategy]] to use when accessing the cache</td>
|
|
<td>No, defaults to <em>no-lock</em></td></tr>
|
|
</tbody>
|
|
</table>
|
|
<h1>Example</h1>
|
|
<code type="xml">
|
|
<cacheDefaults defaultBasedir="mycache" />
|
|
</code>
|
|
Tells Ivy to use "mycache" as default location where all caches should go.
|
|
<hr/>
|
|
<code type="xml">
|
|
<cacheDefaults
|
|
resolutionDir="resolution"
|
|
repositoryDir="repository"
|
|
repositoryIvyPattern="[module]/ivys/ivy-[revision].xml"
|
|
repositoryArtifactPattern="[module]/[type]s/[artifact]-[revision].[ext]"
|
|
lockStrategy="artifact-lock"
|
|
/>
|
|
</code>
|
|
Tells Ivy to put the resolution cache in a directory called 'resolution', and to use the directory named 'repository' as default location for all repository cache(s). It also configures the default ivy and artifact patterns for repository caches, as well as the default lock strategy to use.</textarea>
|
|
<script type="text/javascript">xooki.postProcess();</script>
|
|
</body>
|
|
</html>
|