### Eclipse Workspace Patch 1.0 #P ivy-doc Index: ivyfile/configurations.html =================================================================== --- ivyfile/configurations.html (revision 829115) +++ ivyfile/configurations.html (working copy) @@ -29,13 +29,18 @@ 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. +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. -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. +since 1.3 You can define a default conf mapping on this container by specifying the defaultconfmapping attribute. -See examples on the dependency page. +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. + +If several defaultconfmapping or 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. @@ -45,6 +50,7 @@ AttributeDescriptionRequired + defaultconfthe default conf to use in this ivy file since 2.2No, defaults to no default conf 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 @@ -86,6 +92,22 @@ 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. + +

Examples involving defaultconf and defaultconfmapping

+The table below indicates how Ivy interprets the conf attribute according to how [[ivyfile/configurations defaultconfmapping]] and [[ivyfile/configurations defaultconf]] are set: + + + + + + + + + + + + +
defaultconfdefaultconfmappingconfivy interpretation
*->*
runtimeruntime->runtime
testtest->test
runtimeruntime->runtime
runtimeruntime->*;test->defaultruntime->*
runtimeruntime->*;test->defaulttesttest->default
runtime->*;test->defaultruntime->*;test->default
runtime->*;test->defaultruntimeruntime->*
runtime->*;test->defaulttesttest->default
Index: ivyfile/dependencies.html =================================================================== --- ivyfile/dependencies.html (revision 829115) +++ ivyfile/dependencies.html (working copy) @@ -30,13 +30,14 @@ Container for dependency elements, used to describe the dependencies of this module. If this container is not present, it is assumed that the module has no dependency at all. -This container let the possibility to define two very similar things: defaultconf and defaultconfmapping. +This container provides for two similar behaviors. An overview is given here. (See [[ivyfile/configurations configurations doc page]] for more details about these behaviors). -defaultconf exists since Ivy 1.1 and enables to define the default conf attribute to use when no conf is defined for a dependency in this ivy file. It is only used when no conf mapping is defined, and has no influence in other cases. +since 1.1defaultconfDefines the conf attribute to use when no conf is defined for a dependency in this ivy file. It is only used when no conf mapping is defined, and has no influence in other cases. -defaultconfmapping exists since Ivy 1.3 and enables not only to define the default conf mapping when no conf is specified for a dependency in this ivy file, but it also influence the way conf mapping with no mapped conf are interpreted (see [[ivyfile/configurations configurations doc page]] for details about this). +since 1.3defaultconfmapping Influences the way that a conf mapping with no mapped conf is interpreted. -Note that if both defaultconf and defaultconfmapping are defined, it's the defaultconfmapping that is used. Note also that if several defaultconfmapping are defined (one in the configurations tag, one or several in included configurations file, and/or one in the dependency tag, then it's only the last which is taken into account, the others will have no effect at all. +In Ivy 2.1.0 and earlier, if both defaultconf and defaultconfmapping are defined, it's the defaultconfmapping that is used. Since Ivy 2.2.0, these attributes can be used together. +

Attributes

Index: ivyfile/dependency.html =================================================================== --- ivyfile/dependency.html (revision 829115) +++ ivyfile/dependency.html (working copy) @@ -70,18 +70,7 @@
  • Specify one configuration name
  • This means that in this master configuration the same dependency configuration is needed (except if a defaultconfmapping has been specified in this ivy file, see [[ivyfile/configurations configurations]] for details, or table below for examples). For instance, if the current module has defined a configuration named 'runtime', and the dependency too, then having an inline mapping configuration set to 'runtime' means that in the runtime master configuration the runtime dependency configuration is required. -More examples: -The table below indicates how ivy interpret the conf attribute according to how [[ivyfile/configurations defaultconfmapping]] is set:
    - - - - - - - - - -
    defaultconfmappingconfivy interpretation
    *->*
    runtimeruntime->runtime
    testtest->test
    runtime->*;test->defaultruntime->*;test->default
    runtime->*;test->defaultruntimeruntime->*
    runtime->*;test->defaulttesttest->default
    +The examples on the dependency on the configurations page explain how ivy interprets the conf attribute according to how [[ivyfile/configurations defaultconfmapping]] and [[ivyfile/configurations defaultconf]] is set.
  • Specify a configuration mapping using the '->' operator separating a comma separated list of master configurations (left operand) of a comma separated list of dependency configurations (right operand).
  • A good way to remember which side is for the master configuration (i.e. the configuration of the module defining the dependency) and which side is for the dependency configuration is to read the '->' as 'depends on'.