- Documentation (2.5.0-local-20170911195251)
- Release Notes
- Settings Files
- Ivy Files
- Ant Tasks
- post resolve tasks
- Using standalone
- Developer doc
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
since 2.2 You can define the default conf on this container by specifying the
defaultconf attribute. This attribute defines the conf mapping to use when no conf mapping is specified for a dependency in this Ivy file.
since 1.3 You can define a default conf mapping on this container by specifying the
This attribute modifies 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.
In order to maintain backwards compatibility with Ivy 2.1.0 and earlier, the
defaultconfmapping also provides one additional function. If no
defaultconf is specified (on either the configurations tag or the dependencies tag), the
defaultconfmapping becomes the default configuration for dependencies in this Ivy file when no configuration is specified. In other words, in addition to altering the interpretation of individual configurations with no mapping,
defaultconfmapping also performs exactly like
defaultconf in the absence of a definition for
defaultconf attributes are defined (in the configurations tag, one or several in an included configurations file, and/or in the dependency tag, then it’s only the last definition of each property which is taken into account. The others will have no effect at all.
See examples below to clarify the behavior of these two attributes together.
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.
the default conf to use in this Ivy file since 2.2
No, defaults to no default conf
the default conf mapping to use in this Ivy file since 1.3
No, defaults to no default conf mapping
No, defaults to
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"/> </configurations> <dependencies> <dependency name="other-module" conf="conf1"/> </dependencies>
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
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