namespaces


Tag: namespaces

Namespaces are an advanced feature of Ivy which let you use resolvers in which module names and organisations are not consistent between each other. For instance, if you want to use maven2 repository and ivyrep collectively, you will face some naming issues. For example all apache commons projects are declared to be part of the organisation apache in ivyrep whereas in maven2 ibiblio repository, they are declared to be part of the organisation of the same name of the module.

So if you try to use both maven2 and ivyrep repositories, you will face some issues like:
How do I declare a dependency on commons-lang ?
I have an error while trying to resolve module xxx. It says that it depends on [commons-httpclient commons-httpclient] ant that it isn't available.
...
Ivy has an answer to give to this kind of troubles, and this answer is called namespaces. In short, you can affect a namespace to each dependency resolver in Ivy, and each namespace defines rules to convert names from the system namespace to the defined namespace itself, and vice versa.

This very powerful feature is thoroughly used in the build your own repository tutorial, and this is a good place to have examples of what can be done with namespaces.

Child elements

ElementDescriptionCardinality
namespacedefines a new namespace 0..n