Tag: configurations Parent: ivy-module

A container for configuration elements. If this container is not present, it is assumed that the module has one public configuration called 'default'.

since 1.3 You can define a new default conf mapping on this container by specifying the defaultconfmapping attribute.

A default conf mapping is very similar to the defaultconf which can be set on the dependencies tag, but it has a slightly different behaviour.
The default conf mapping not only defines the conf mapping to use when no conf mapping is specified for a dependency in this ivy file, but it also modify the way ivy interprets conf mapping with no mapped conf. In this case, Ivy will look in the default conf mapping and use the conf mapping defined in the default conf mapping for the conf for which there is no mapped conf.

See examples on the dependency page.

since 1.4 You can activate a confmappingoverride mode for all configurations, in which case the extending configurations will override the mappings of the configurations they extend from.


defaultconfmappingthe default conf mapping to use in this ivy file since 1.3 No, defaults to no default conf mapping
confmappingoverridetrue to activate configuration mapping override, false otherwise since 1.4 No, defaults to false

Child elements

confdeclares a configuration of this module 0..n
includeinclude configurations from another file 0..n

Configuration mappings details

When Ivy parses your Ivy file, it will create (internally) modify the configuration mapping of your dependencies.
For instance, say you have:
<configurations defaultconfmapping="conf1->other1;conf2->other2">
<conf name="conf1" />
<conf name="conf2" extends="conf1" />
<dependency name="other-module" conf="conf1" />
When Ivy parses this file, it will construct the following dependency (in-memory only):
<dependency name="other-module" conf="conf1->other1" />
So, if you now resolve the conf2 configuration, you will only get the other1 dependencies of your other-module.

But when you set confmappingoverride to true, Ivy will construct the following dependency in memory:
<dependency name="other-module" conf="conf1->other1;conf2->other2" />
As you can see, the defaultmappings of the extending configurations are also added (although you didn't explicitly defined them)

When you now resolve the conf2 configuration, you'll get the other2 dependencies of your other-module.