blob: 5249a672400808ef8e2a5299882a5fd4eaa1ff27 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-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>
<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-managers
<span class="tagdoc" id="ivysettings.conflict-managers">Defines a list of <a href="../concept.html#conflict">conflicts managers</a> usable in Ivy.</span> Each conflict manager is identified by its name, given as an attribute.
The child tag used for the conflict manager must be equal to a name of a conflict manager type (either built-in or added with the typedef tag).
Here is a list of built-in conflicts managers (which do not require anything in the configuration file):
<ul>
<li>all</li> this conflicts manager resolve conflicts by selecting all revisions. Also called the NoConflictManager, it doesn't evict any modules.
<li>latest-time</li> this conflict manager selects only the 'latest' revision, latest being defined as the latest in time. Note that latest in time is costly to compute, so prefer latest-revision if you can.
<li>latest-revision</li> this conflict manager selects only the 'latest' revision, latest being defined by a string comparison of revisions.
<li>latest-compatible</li> this conflict manager selects the latest version in the conflicts which can result in a compatible set of dependencies. This means that in the end, this conflict manager does not allow any conflicts (similar to the strict conflict manager), except that it follows a best effort strategy to try to find a set of compatible modules (according to the version constraints)
<li>strict</li> this conflict manager throws an exception (i.e. causes a build failure) whenever a conflict is found.
</ul>
The two "latest" conflict managers also take into account the force attribute of the dependencies.
Indeed direct dependencies can declare a force attribute (see <a href="../ivyfile/dependency.html">dependency</a>), which indicates that the revision given in the direct dependency should be preferred over indirect dependencies.
Here is a list of conflict manager types available, which can be used to define your own custom conflict managers:
<ul>
<li>latest-cm</li>The latest conflict manager uses a latest strategy to select the latest revision among several ones. Both latest-time and latest-revision conflict managers are based on this conflict manager type. It takes 'latest' as attribute to define which latest strategy should be used. Example:
<code><latest-cm name="mylatest-conflict-manager" latest="my-latest-strategy"/></code>
<li>compatible-cm</li>The latest compatible conflict manager uses a latest strategy to select the latest revision among several ones. It takes 'latest' as an attribute to define which latest strategy should be used. Example:
<code><compatible-cm name="my-latest-compatible-conflict-manager" latest="my-latest-strategy"/></code>
<li>regexp-cm</li>This conflict manager is based on a regular expression and throws an exception (i.e. causes a build failure) when a conflict is found with versions with different matching group. For instance if a conflict is found between 1.2.x and 1.3.y it will throw an exception if the regular expression is (.*)\.\d, because the matching group will match different strings (1.2 and 1.3). 1.2.1 and 1.2.2 won't throw an exception with the same regular expression. The regular expression is set using the 'regexp' attribute. A 'ignoreNonMatching' attribute can also be set to simply warn when a version is found which does not match the regular expression, instead of throwing an exception.
</ul>
<h3>Child elements</h3>
<table class="ivy-children">
<thead>
<tr><th class="ivy-chld">Element</th><th class="ivy-chld-desc">Description</th><th class="ivy-chld-card">Cardinality</th></tr>
</thead>
<tbody>
<tr><td>any conflict manager</td><td>adds a conflict manager to the list of available conflict managers</td>
<td>0..n</td></tr>
</tbody>
</table>
</textarea>
<script type="text/javascript">xooki.postProcess();</script>
</body>
</html>