You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by ma...@syntigo.com on 2008/12/03 14:47:00 UTC

What configurations are selected when no configuration mapping is set in ivy.xml

Hi,
In the Ivy documentation (reference page for the "dependency" tag), it is
mentioned that when no defaultconfigmapping nor conf attribute is specified,
the ivy interpretation will be "*->*".
Should I really interprete both asterisks as wildcards ? Or is it more a "*->#"
dependency ? I ask this, because I was more expecting the latter mapping as
default behaviour.

For example suppose I have modA which has a dependency upon modB. modA has two
configurations conf1 and conf2, and modB has three configurations conf1, conf2
and conf3.
From what I understand from the doc, Ivy will retrieve than by default both
conf1, conf2 and conf3 of modB ?

Thanks,
Marc




Re: What configurations are selected when no configuration mapping is set in ivy.xml

Posted by Mitch Gitman <mg...@gmail.com>.
Just for sanity's sake, let's suppose your modA has two configurations,
default and test. As a practical matter, it's going to be highly unusual for
you to want to leave out the conf attribute of the dependency element. The
ivy.xml for modA might have a dependency:
    <dependency org="theteam" name="modB" rev="1.0" conf="default->*" />

You're starting from default, rather than from both default and test.

The above example makes modA's default depend on modB's conf1, conf2, and
conf3. Or you might want to say that modA's default only depends on modB's
conf1:
    <dependency org="theteam" name="modB" rev="1.0" conf="default->*conf1*"
/>

I'm sure there's some good use case for letting a dependency default to
conf="*->*", but in a more typical case you want to have more precise
control over your own project's (in this case modA's) per-configuration
dependencies.

On Wed, Dec 3, 2008 at 5:47 AM, <ma...@syntigo.com> wrote:

> Hi,
> In the Ivy documentation (reference page for the "dependency" tag), it is
> mentioned that when no defaultconfigmapping nor conf attribute is
> specified,
> the ivy interpretation will be "*->*".
> Should I really interprete both asterisks as wildcards ? Or is it more a
> "*->#"
> dependency ? I ask this, because I was more expecting the latter mapping as
> default behaviour.
>
> For example suppose I have modA which has a dependency upon modB. modA has
> two
> configurations conf1 and conf2, and modB has three configurations conf1,
> conf2
> and conf3.
> From what I understand from the doc, Ivy will retrieve than by default both
> conf1, conf2 and conf3 of modB ?
>
> Thanks,
> Marc
>
>
>
>

Re: What configurations are selected when no configuration mapping is set in ivy.xml

Posted by Maarten Coene <ma...@yahoo.com>.
Marc,

your understanding is correct, Ivy will retrieve *all* configurations of the target dependency.

If you want to avoid defining the conf attribute on all of your dependencies, you can specify the defaultconfmapping attribute in your ivy.xml file.
Cfr. http://ant.apache.org/ivy/history/latest-milestone/ivyfile/dependency.html#defaultconfmapping

Maarten



----- Original Message ----
From: "marc.deboeck@syntigo.com" <ma...@syntigo.com>
To: ivy-user@ant.apache.org
Sent: Wednesday, December 3, 2008 2:47:00 PM
Subject: What configurations are selected when no configuration mapping is set in ivy.xml

Hi,
In the Ivy documentation (reference page for the "dependency" tag), it is
mentioned that when no defaultconfigmapping nor conf attribute is specified,
the ivy interpretation will be "*->*".
Should I really interprete both asterisks as wildcards ? Or is it more a "*->#"
dependency ? I ask this, because I was more expecting the latter mapping as
default behaviour.

For example suppose I have modA which has a dependency upon modB. modA has two
configurations conf1 and conf2, and modB has three configurations conf1, conf2
and conf3.
>From what I understand from the doc, Ivy will retrieve than by default both
conf1, conf2 and conf3 of modB ?

Thanks,
Marc