Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » No resolve against targetplatform
No resolve against targetplatform [message #896700] Thu, 19 July 2012 12:15 Go to next message
Alan Underwood is currently offline Alan UnderwoodFriend
Messages: 37
Registered: October 2010
Member
I've created a target platform with Buckminster on hudson which I archive. I've downloaded and unzipped the target platform and set it as the target platform in my IDE. Looking at the content through the IDE target editor all plugins are there and properly installed. It is an 'install' type where the plug-ins are in runnable form.

I have a problem where Buckminster appears to ignore workspace and target platform plug-ins. Resolving goes to my rmap first, which will fail on the last locator. Instead resolving should go to local providers first, then the rmap.
I can try to do a cquery for org.eclipse.osgi as a bundle, and it fails. If I remove the rmap entry from the cquery, then it works, because it will look in the local scopes first, including the target platform. (I have no advisor nodes or properties or anything special)

I'm using Eclipse 3.7.2 and the latest 1.4.0 Buckminster.

With an rmap entry in cquery I get the following: (Note I'm not attached to web so this is approx)
org.eclipse.osgi:
Using resolver map
Using resource map file:/blah/proj.rmap
Using searchpath maven
Can't find in rmap
FAIL

If I remove the rmap entry from the cquery I get the following:
org.eclipse.osgi:
Using resolver map
Trying provider local(materialization)
No materialization
Trying provider local(workspace)
No workspace project
Trying provider local(target)
found match
SUCCESS

Is this a bug or am I doing something really dull? Have providers [local(...), rmap] had their order changed?

I'm confused because I've not had this problem before.

Alan

[Updated on: Thu, 19 July 2012 12:17]

Report message to a moderator

Re: No resolve against targetplatform [message #896706 is a reply to message #896700] Thu, 19 July 2012 12:33 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Hi Alan,

Nothing has changed with respect to in what order things are resolved. Would it be easy for you to provide some sample
files that will reproduce this problem and attach them to a bugzilla?

- thomas

On 07/19/2012 02:15 PM, Alan Underwood wrote:
> I've created a target platform with Buckminster on hudson which I archive. I've downloaded and unzipped the target
> platform and set it as the target platform in my IDE. Looking at the content through the IDE target editor all plugins
> are there and properly installed. It is an 'install' type where the plug-ins are in runnable form.
>
> I have a problem where Buckminster appears to ignore workspace and target platform plug-ins. Resolving goes to my rmap
> first, which will fail on the last locator. Instead if should go to local providers first, then the rmap.
> I can try to do a cquery for org.eclipse.osgi as a bundle, and it fails. If I remove the rmap entry from the cquery,
> then it works, because it will look in the local scopes first, including the target platform. (I have no advisor nodes
> or properties or anything special)
>
> I'm using Eclipse 3.7.2 and the latest 1.4.0 Buckminster.
>
> With an rmap entry in cquery I get the following: (Note I'm not attached to web so this is approx)
> org.eclipse.osgi: Using resolver map
> Using resource map file:/blah/proj.rmap
> Using searchpath maven
> Can't find in rmap
> FAIL
>
> If I remove the rmap entry from the cquery I get the following:
> org.eclipse.osgi:
> Using resolver map
> Trying provider local(materialization)
> No materialization
> Trying provider local(workspace)
> No workspace project
> Trying provider local(target)
> found match
> SUCCESS
>
> Is this a bug or am I doing something really dull? Have providers [local(...), rmap] had their order changed?
>
> I'm confused because I've not had this problem before.
>
> Alan
>
Re: No resolve against targetplatform [message #896707 is a reply to message #896706] Thu, 19 July 2012 12:41 Go to previous messageGo to next message
Alan Underwood is currently offline Alan UnderwoodFriend
Messages: 37
Registered: October 2010
Member
Hi Thomas

No, it would be too awkward to transfer files to web. I will try a similar setup at home tomorrow and see if it is something I can recreate - in which case I will attach files.

Thanks.

Alan

[Updated on: Thu, 19 July 2012 12:42]

Report message to a moderator

Re: No resolve against targetplatform [message #896726 is a reply to message #896706] Thu, 19 July 2012 13:54 Go to previous message
Alan Underwood is currently offline Alan UnderwoodFriend
Messages: 37
Registered: October 2010
Member
Okay, Thomas. I think I've found the problem by debugging the buckminster code. It's because I am using a maven provider as the first matching location in my rmap. This is an obscure edge-case so I think is a bug.

In ResourceMapResolver.innerResolve(), on line 199 you get the first provider for the query object from the rmap. In my case this is a maven provider. The test on line 200 checks if the provider hasLocalCache, which apparently the maven provider does. This then sets mayUseLocalResolver to false and so no resolution again local providers occurs!
I'm not sure why the code does this but it's caused me major headaches for two days! All I need to do to work around it is create a nonsense location and provider in the rmap that is not maven and is first in the list. Bizarre...

			if (query.useResolutionService()) {
				cquery = query.getComponentQuery();
				rmapURL = cquery.getResolvedResourceMapURL();
				rmap = factory.getResourceMap(getContext(), rmapURL, cquery.getConnectContext());
				Provider directProvider = rmap.getFirstProvider(query);
				if (directProvider != null && directProvider.hasLocalCache())
					// Use the given provider! Make no attempt to use the
					// LocalProvider
					mayUseLocalResolver = false;
			}



To recreate the problem,

  • Create an rmap with one location and searchpath which uses a maven provider.
  • Set your target platform to any target platform.
  • Define a cquery for a plug-in in your target platform and using the rmap.
  • Resolve and fail.

Previous Topic:Adding source features to category.xml
Next Topic:Buckminster qualifier replacement last revision SVN
Goto Forum:
  


Current Time: Fri Apr 26 10:06:54 GMT 2024

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

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

Back to the top