ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jimmy Wan <ji...@indeed.com>
Subject Re: transitive dependencies ignoring configuration scope
Date Mon, 05 May 2008 19:11:43 GMT
I had a fundamental misunderstanding of how "*->*" worked.

This fixed my problem, thanks.

On Fri, 2 May 2008, Archie Cobbs wrote:

>You're dependency of Parent to Child does not specify any configuration
>mapping, so you get the default which is "*->*". Probably what you want is:
>
>   <dependencies>
>       <dependency org="MyOrg" name="ChildModule"
>rev="${childmodule.version}" conf="*->master" changing="true"/>
>       <dependency org="junit" name="junit" rev="${junit.version}"
>conf="test->default" />
>   </dependencies>
>
>-Archie
>
>On Fri, May 2, 2008 at 12:12 PM, Jim Adams <Jim.Adams@sas.com> wrote:
>
>> Since test is already defined as test->master, doesn't that make it
>> equivalent to having "master" everywhere?
>>
>> > -----Original Message-----
>> > From: Jimmy Wan [mailto:jimmy@indeed.com]
>> > Sent: Friday, May 02, 2008 12:23 PM
>> > To: ivy-user@ant.apache.org
>> > Subject: Re: transitive dependencies ignoring configuration scope
>> >
>> > My ivy files look like the ones listed below. I tried changing the
>> dependency
>> > in ParentModule on ChildModule to use conf="*->*" but that made no
>> > difference. The ivy reports for master, compile, and default are always
>> > showing TestModule as a dependency of ParentModule because it was a
>> > dependency of common-util in test. It's as though it's ignoring the
>> > "test->default" rule that I stated in childmodule.
>> >
>> > TestModule:
>> > <publications>
>> >     <artifact name="junit" type="jar" ext="jar"/>
>> > </publications>
>> >
>> > ChildModule:
>> >     <configurations>
>> >         <conf name="master"/>
>> >         <conf name="test" extends="master"/>
>> >         <conf name="compile" extends="master"/>
>> >         <conf name="default" extends="master"/>
>> >     </configurations>
>> >
>> >     <publications>
>> >         <artifact name="ChildModule" conf="master"/>
>> >     </publications>
>> >
>> >     <dependencies>
>> >         <dependency org="junit" name="junit" rev="${junit.version}"
>> conf="test->default" />
>> >     </dependencies>
>> >
>> > ParentModule:
>> >     <configurations>
>> >         <conf name="master"/>
>> >         <conf name="test" extends="master"/>
>> >         <conf name="compile" extends="master"/>
>> >         <conf name="default" extends="master"/>
>> >     </configurations>
>> >
>> >     <publications>
>> >         <artifact name="ParentModule" conf="master"/>
>> >     </publications>
>> >
>> >     <dependencies>
>> >         <dependency org="MyOrg" name="ChildModule"
>> rev="${childmodule.version}" changing="true"/>
>> >         <dependency org="junit" name="junit" rev="${junit.version}"
>> conf="test->default" />
>> >     </dependencies>
>> >
>> > On Thu, 1 May 2008, Archie Cobbs wrote:
>> >
>> > >What do the <dependency> sections of each of the three ivy.xml files
>> look
>> > >like?
>> > >
>> > >On Thu, May 1, 2008 at 6:11 PM, Jimmy Wan <jimmy@indeed.com> wrote:
>> > >
>> > >> I'm seeing a problem where dependencies of my dependencies end up in
>> every
>> > >> configuration, but it seems like they shouldn't.
>> > >>
>> > >> Example:
>> > >> TestModule is a dependency of ChildModule for the configuration
>> "test"
>> > >> ChildModule is a dependency of ParentModule with no specified
>> > >> configuration
>> > >> (i.e. all).
>> > >> I now see TestModule as a dependency of ParentModule for all
>> > >> configurations.
>> > >>
>> > >> Am I doing something wrong? TestModule has no stated configurations.
>> > >> ChildModule and ParentModule have the same set of multiple
>> configurations.
>> > >> The "test" configuration and the "default" configuration are both
>> > >> decendants of the "master" configuration.
>> > >>
>> > >> I'm using 2.0.0-beta2.

Mime
View raw message