|
Re: P2 provider using different repositories [message #1062707 is a reply to message #1062698] |
Mon, 10 June 2013 12:43 |
|
Hi Adolfo,
You can either combine the repos in one search path and let Buckminster choose the best fit (highest version) or you can
use separate search paths with failOnError="false" on each locator and have Buckminster try them in turn.
Filters can be combined with OR (|) as well as AND (&) that you're already using and they can be nested to any depth
using parenthesis. This is perfectly legal:
(&(|(build.type=R)(build.type=S)(build.type=I))(resolve.target.platform=true))
HTH,
- thomas
On 2013-06-10 14:16, Adolfo Sanchez-Barbudo Herrera wrote:
> Hi Buckminsters,
>
> I'm trying to deal with a requesite which I'm not sure how to deal with buckminster.
>
> I currently have my rmaps configured to resolve depedencies against different P2 repositories, depending on a parameter
> (build.type). For instance to resolve my dependencies on EMF bundles/features:
>
> <rm:searchPath name="emf">
> <rm:provider componentTypes="eclipse.feature,osgi.bundle"
> resolutionFilter="(&(build.type=N)(resolve.target.platform=true))" readerType="p2" source="false" mutable="false">
> <rm:property key="buckminster.source" value="false"/>
> <rm:property key="buckminster.mutable" value="false"/>
> <rm:uri format="{0}/modeling/emf/emf/updates/nightly">
> <bc:propertyRef key="eclipse.download"/>
> </rm:uri>
> </rm:provider>
> <rm:provider componentTypes="eclipse.feature,osgi.bundle"
> resolutionFilter="(&(build.type=I)(resolve.target.platform=true))" readerType="p2" source="false" mutable="false">
> <rm:property key="buckminster.source" value="false"/>
> <rm:property key="buckminster.mutable" value="false"/>
> <rm:uri format="{0}/modeling/emf/emf/updates/interim">
> <bc:propertyRef key="eclipse.download"/>
> </rm:uri>
> </rm:provider>
> ...
>
> However, now I have the following requisite:
>
> "N-build to use the most recent of EMF's R/S/I/N repository
> I-build to use the most recent of EMF's R/S/I repository
> S-build to use the most recent of EMF's R/S repository
> R-build to use the most recent of EMF's R repository"
>
> I can't find a straightforward solution to implement this, at least, via Buckminster rmaps configuration.
>
> Any hint about this is very welcomed.
>
> Cheers,
> Adolfo.
|
|
|
Re: P2 provider using different repositories [message #1062740 is a reply to message #1062707] |
Mon, 10 June 2013 14:57 |
Adolfo Sanchez-Barbudo Herrera Messages: 260 Registered: July 2009 |
Senior Member |
|
|
Hi Thomas,
Thanks for the reply
I don't want to combine several filters for the same repo, but the other way: Combine several repos for the same filter.
Several locators is not the solution here, since the key point is that 4 available repositories may resolve the desired bundle/feature. As far as I know, as soon the bundle is resolved, no more locators are used.
I thought that the same applied for different providers in the same SearchPath, that is, as soon the first privider resolves your bundle, the remaining one are ignored. However, as I understand from your comment, every of them are used so that if several of them provide a bundle candidate, the higher version is used. That's what I want !!!. If so, it's just a matter of adjusting the filters as you mentioned.
Rechecking bucky book, it specifies what you mentioned ;):
Quote:
A search path must have at least one provider. A search path typically contains one provider, but
it is possible to specify more than one -- in which case the provider capable of returning the component
with the highest matching score compared against the request will be used. If two providers return
the same score, the provider declared first is used. When making a request, options can be set that are
compared to attributes set in the provider declarations to reach the score.
I'll try it. Thanks a lot !!!!
Cheers,
Adolfo.
|
|
|
Powered by
FUDForum. Page generated in 0.04240 seconds