- 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
override
Tag: override Parent: dependencies
[since 2.0]
Specify an override mediation rule, overriding the revision and/or branch requested for a transitive dependency.
This can be useful when a direct dependency is bringing a transitive dependency for which you want to change the revision, without actually declaring a dependency on it (because the module doesn’t actually depend on it) and without using conflict management for this purpose (maybe because there is no conflict at all, or because you want to bypass conflict management for this particular transitive dependency).
Overriding is done before any else, in a phase called dependency descriptor mediation. The transitive dependency then behaves exactly as if it were declared with the new value.
Note that even though no attribute is required, it makes no sense to set no attributes at all. It would mean that overriding is triggered for all transitive dependencies, but doesn’t override anything. Most of the time, at least org or module should be set to override only a subset of transitive dependencies, and at least branch or rev should be set to actually override something.
Attributes
Attribute | Description | Required |
---|---|---|
org |
the name, or an expression matching the name of organisation to which overriding should be applied (see matcher attribute below) |
No, defaults to |
module |
the name, or an expression matching the name of module to which overriding should be applied (see matcher attribute below) |
No, defaults to |
branch |
the branch to set for all the overridden dependency descriptors |
No, by default branch is not overridden |
rev |
the revision to set for all the overridden dependency descriptors |
No, by default revision is not overridden |
matcher |
the matcher to use to match the modules for which the conflict manager should be used |
No, defaults to |