modules

Tag: modules

Defines per module or module set settings.

The rules are given by defining a module set, using pattern for module organisation and name, and giving some settings for the set, like the name of the corresponding resolver to use.

If no rule match a given module, the default setting will be used.

Even if not required, because the use of a default big resolver (chain, for instance) able to resolve all dependencies can answer all the needs, the configuration of smaller resolvers used for different cases can improve performances a lot. For instance, if you have a local repository for your modules and a distant repository for third party libraries, it is a good idea to have two separate resolvers, and configure ivy to use one for all your modules and another for the rest (the default one).

Child elements

Element Description Cardinality
module defines a module set rule 1..n

module

Tag: module

Define a module set rule. The tag defines a module set, by giving an expression and the matcher to use for organisation and name (for instance, you can use * to specify all).

It also gives the specific setting to use for this module set.

For each module set, you can configure:

Attributes

Attribute Description Required
organisation the name of the organisation to which apply the resolver. May be a regexp. Yes
name the name of the module to which apply the resolver. May be a regexp. Yes
matcher the matcher to use to match the modules to which the resolver should be applied since 1.3 No, defaults to exactOrRegexp in pre 1.3 ivy files, and exact in 1.3 and superior
resolver the name of the resolver to apply. The resolver must have been defined in the resolvers section of the configuration file. No
conflict-manager the name of the conflict manager to apply. since 1.4 No
branch the default branch to apply. since 1.4 No

Examples

<modules>
  <module organisation="jayasoft" name="*" resolver="myprojectsresolver"/>
</modules>

Uses myprojectresolver for all modules from jayasoft.


<modules>
  <module organisation="apache" name="commons-*" matcher="glob" resolver="myapachecommonsresolver"/>
</modules>

Uses myapachecommonsresolver for all modules beginning by commons- from apache.


<modules>
  <module organisation="apache" name="commons-[a-z]+" matcher="regexp" resolver="myapachecommonsresolver"/>
</modules>

Uses myapachecommonsresolver for all modules from apache beginning by commons- followed by any number of alphabetic lowercase characters.


<modules>
  <module organisation="jayasoft" name="ivy*" matcher="glob" conflict-manager="latest-time"/>
</modules>

Uses latest-time conflict manager for all modules from jayasoft which name begins with ivy.


<modules>
  <module organisation="jayasoft" name="ivy*" matcher="glob" branch="fix-103"/>
</modules>

Uses 'fix-103' as default branch for all modules from jayasoft which name begins with ivy.