Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » dependency resolution strategy
dependency resolution strategy [message #505872] Tue, 05 January 2010 12:37 Go to next message
Eclipse UserFriend
Originally posted by: pajai.extrabright.com

Hi all,

I am trying to understand how Buckminster does the dependency
resolution, in case where the same artifact in different version is a
transitive dependency of a base artifact (say an OSGi bundle).

Ex:
- Artifact A depends on B and C
- B depends on D version 1.5
- C depends on E
- E depnds on D version 1.6

Visually:
A - B
- D 1.5
- C
- E
- D 1.6

In such a case, maven would pick the artifact D which is closer to the
base artifact (in this case D 1.5), which is quite arbitrary.

After running some tests, it seems that Buckminster tries to pick both.
But I am not sure about that (which would lead to problems). Can someone
confirm which is Buckminster's strategy at choosing the right dependency?

Is there a way (for instance in a cspex of artifact A) to define which
version of D should be picked?

Thanks in advance.
Cheers,

Patrick
Re: dependency resolution strategy [message #506191 is a reply to message #505872] Wed, 06 January 2010 09:02 Go to previous message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Hi Patrick,
Buckminster will always use version ranges and will make an attempt to intersect them to find a
common version that suits all requests. In the case of maven, such ranges are normally explicit so
there is no possible intersection. That in turn, means that both dependencies must be brought in.

You can override the selected version by using advisor nodes in the CQUERY. In your case you would
add a node with pattern that matches a request for D and specify that the range for all such
requests should be >= 1.6.

Regards,
Thomas Hallgren

Patrick J. wrote:
> Hi all,
>
> I am trying to understand how Buckminster does the dependency
> resolution, in case where the same artifact in different version is a
> transitive dependency of a base artifact (say an OSGi bundle).
>
> Ex:
> - Artifact A depends on B and C
> - B depends on D version 1.5
> - C depends on E
> - E depnds on D version 1.6
>
> Visually:
> A - B
> - D 1.5
> - C
> - E
> - D 1.6
>
> In such a case, maven would pick the artifact D which is closer to the
> base artifact (in this case D 1.5), which is quite arbitrary.
>
> After running some tests, it seems that Buckminster tries to pick both.
> But I am not sure about that (which would lead to problems). Can someone
> confirm which is Buckminster's strategy at choosing the right dependency?
>
> Is there a way (for instance in a cspex of artifact A) to define which
> version of D should be picked?
>
> Thanks in advance.
> Cheers,
>
> Patrick
Previous Topic:buckminster and the delta pack
Next Topic:qualifier replacement "generator:lastModified" does not take externals into account
Goto Forum:
  


Current Time: Fri Apr 19 02:45:48 GMT 2024

Powered by FUDForum. Page generated in 0.02059 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top