- Documentation (2.5.1-local-20221102182706)
- Release Notes
- Tutorials
- Reference
- Introduction
- Settings Files
- Ivy Files
- Ant Tasks
- artifactproperty
- artifactreport
- buildlist
- buildnumber
- buildobr
- cachefileset
- cachepath
- checkdepsupdate
- cleancache
- configure
- convertmanifest
- convertpom
- deliver
- dependencytree
- findrevision
- fixdeps
- info
- install
- listmodules
- makepom
- post resolve tasks
- publish
- report
- repreport
- resolve
- resources
- retrieve
- settings
- var
- Using standalone
- OSGi
- Developer doc
conflict-managers
Tag: conflict-managers
Defines a list of conflict managers usable in Ivy. 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 conflict managers (which do not require anything in the settings file):
-
all
this conflict manager resolve conflicts by selecting all revisions. Also called theNoConflictManager
, it doesn’t evict any modules. -
latest-time
this conflict manager selects only thelatest
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. -
latest-revision
this conflict manager selects only thelatest
revision, latest being defined by a string comparison of revisions. -
latest-compatible
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) -
strict
this conflict manager throws an exception (i.e. causes a build failure) whenever a conflict is found.
The two "latest" conflict managers also take into account the force attribute of the dependencies. In fact, direct dependencies can declare a force attribute (see dependency), 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:
-
latest-cm
The latest conflict manager uses a latest strategy to select the latest revision among several ones. Bothlatest-time
andlatest-revision
conflict managers are based on this conflict manager type. It takeslatest
as attribute to define which latest strategy should be used. Example:
<latest-cm name="mylatest-conflict-manager" latest="my-latest-strategy"/>
-
compatible-cm
The latest compatible conflict manager uses a latest strategy to select the latest revision among several ones. It takeslatest
as an attribute to define which latest strategy should be used. Example:
<compatible-cm name="my-latest-compatible-conflict-manager" latest="my-latest-strategy"/>
-
regexp-cm
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 theregexp
attribute. AignoreNonMatching
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.
Child elements
Element | Description | Cardinality |
---|---|---|
any conflict manager |
adds a conflict manager to the list of available conflict managers |
0..n |