blob: a4c3027894ed61a98005fe39b2838e4a61616b68 [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">
<b>Tag:</b> conflict <b>Parent:</b> <a href="../ivyfile/dependencies.html">dependencies</a><br/>
<br/>
<span class="since">(since 2.0)</span>
Specify a a conflict manager for one or several dependencies.
The way to specify a conflict manager is by giving indication to which dependencies the conflict manager applies (by giving organisation and module names or name regexp), and then specifying the conflict manager, either by giving its name or by specifying a fixed revision list, in which case a fixed conflicts manager is used.
The list of built-in conflict managers available is listed on the [[settings/conflict-managers conflict manager configuration page]].
Conflicts manager are used during the resolve operation, i.e. when ivy analyse the graph of dependencies and download corresponding ivy files and artifacts. The fact to manage conflict at resolve time enables to minimize downloads: when a module is evicted by a conflict manager, it is not downloaded.
There are two things optimized during conflict resolution: download of artifacts and download of ivy files. The first is always ensured by ivy, i.e. artifacts of a module evicted will never be downloaded. The second is not as simple to handle because to know what are the conflicts ivy needs to know the dependency graph, and to know the dependency graph, it has to download ivy files. But ivy is highly optimized on this too, and it tries to evict modules as soon as possible.
That's why the order of dependencies is important for download optimization. Indeed ivy traverses the dependency graph in the order in which dependencies are declared in the ivy files, and each time it encounters a dependency on a module, it first check if there is a conflict on this module, and if this is the case, it asks the conflict manager to resolve the conflict. Then if the module is evicted, it does not download its ivy file, and the whole branch is not traversed, which can saves a lot of time.
If no specific conflict manager is defined, a default conflict manager is used for all modules.
The current default conflict manager is the "latest-revision" conflict manager.
<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>org</td><td>the name, or an expression matching the name of organisation to which this conflict manager should apply (see matcher attribute below)</td>
<td>No, defaults to * (match all)</td></tr>
<tr><td>module</td><td>the name, or an expression matching the name of module to which this conflict manager should apply (see matcher attribute below)</td>
<td>No, defaults to * (match all)</td></tr>
<tr><td>manager</td><td>the name of the conflict manager to use</td>
<td rowspan="2">Exactly one of two</td></tr>
<tr><td>rev</td><td>a comma separated list of revisions this conflict manager should select</td></tr>
<tr><td>matcher</td><td>the <a href="../concept.html#matcher">matcher</a> to use to match the modules for which the conflict manager should be used</td>
<td>No, defaults to exact</td></tr>
</tbody>
</table>
</textarea>
<script type="text/javascript">xooki.postProcess();</script>
</body>
</html>