What is a configurationmapping in ivy?
Asked Answered
Z

2

1

I have stuff like this:

<configurations defaultconfmapping="build->default;compile->compile(*),master(*);test,runtime->runtime(*),master(*); statistic->stistic(*)">

in my ivy.xml and I don't understand the concept of a 'configuration mapping'

Who gets mapped to what? Why? What does the (*) mean?

Zingaro answered 16/10, 2009 at 15:42 Comment(0)
H
0

I've been trying to understand this myself for the last few days. I think this is how it works:

"build->default" means that if I ask for all of the "build" dependencies of my jar, then Ivy pulls the "default" version of that dependency from the repository. If instead you say "build->build" or equivalently "build" then Ivy looks for a jar tagged "build" in the repository to satisfy that dependency. I think the main purpose of having multiple tagged artifacts in the repo are to have a "default", "source", "javadoc" and maybe "debug" version of your code.

I make heavy use of "provided->default" to specify jars that I need to compile against, but that I don't need to add to my plugin installer because I know that jar will already be present at runtime because it's provided by a different installer.

Hiroshige answered 29/1, 2011 at 5:26 Comment(0)
S
0

To my understanding after reading the "dependency" documentation (instead of the "configurations" documentation which IMHO is less clear), a "master configuration" (left side of arrow; i.e. a configuration of the current module) gets mapped to a "dependency configuration" (right side of arrow) in order to determine which configuration(s) of the dependency are required in which configuration(s) of the current module.

Since Ivy 1.3, the dependency configuration may have a fallback listed in parenthesis, and this is allowed to be a wildcard ("*").

Scurrile answered 28/4, 2014 at 10:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.