Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » Re: How to use readerType="eclipse.import" in RMAP
Re: How to use readerType="eclipse.import" in RMAP [message #375569] Sat, 09 February 2008 01:59 Go to next message
Carsten Pfeiffer is currently offline Carsten PfeifferFriend
Messages: 34
Registered: July 2009
Member
Thomas Hallgren wrote:

Hi Thomas,

thanks for the quick response!

> It should be. Simply point a provider with reader type "eclipse.import" to
> the "site" that you use as source. A "site" is something that the
> import.reader can understand. Typically a folder that contains a site.xml
> (optional) and a features and plugins folder. Append ?importType=linked at
> the end of the URL.

I'm probably missing something, but I can't get this to work. I'm trying to
import some plugins from one workspace into another. Here's my files:

<?xml version="1.0" encoding="UTF-8"?>
<rmap
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.eclipse.org/buckminster/RMap-1.0"
xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
xmlns:mp="http://www.eclipse.org/buckminster/MavenProvider-1.0"
xmlns:pp="http://www.eclipse.org/buckminster/PDEMapProvider-1.0">

<searchPath name="default">
<provider
readerType="eclipse.import"
componentTypes="eclipse.feature,osgi.bundle,buckminster,unknown "
mutable="true"
source="true">
<uri format="file:/home/test/src/eclipse?importType=linked" />
</provider>
</searchPath>

<!-- all components use the same search path -->
<locator pattern=".*" searchPathRef="default" />
</rmap>

========

<?xml version="1.0" encoding="UTF-8"?>
<cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0"
resourceMap="file:/home/test/test-rmap.rmap">
<cq:rootRequest name="de.gebit.some.plugin"
componentType="osgi.bundle"/>
</cq:componentQuery>


Executing the query resolves the plugin just fine, popping up a wizard,
where I select "workspace" as destination type. Now whether I enter the
workspace location under "Location" or under "Workspace" (is the latter
supposed to be a workspace-relative path?) doesn't matter, the plugin is
not linked into the new workspace, but instead a plugins-folder is created
in the workspace, and the plugin is copied into that.

I.e. when I enter /tmp/ws as workspace "location" and press finish, I get
/tmp/ws/plugins/de.gebit.some.plugin/... as a result.

Not quite what I expected :-}

And when I manage to get this running (presumably with your help :-), I'll
be wondering how to do this not just with plugins, but with plain eclipse
java projects. I.e. link-import some java projects from one workspace into
another.

Thanks,
Carsten
Re: How to use readerType="eclipse.import" in RMAP [message #375571 is a reply to message #375569] Sat, 09 February 2008 10:04 Go to previous message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Hi Carsten,
The "eclipse.import" reader is not designed do just any type of import. It corresponds to the two
choices you see when you right click in the Package Explorer and choose "Import" -> "Plug-in
Development", i.e. it allows you to import plug-ins and features from a target platform. We've then
extended the meaning of "target platform" to include a remote update site or a catalog like the one
used by Orbit. But you cannot import source projects using this reader.

But don't despair, there is another solution that might work for you, and that's the reader type
'local'. This reader-type was designed for the special case when Buckminster is applied on folders
that are already in existence (perhaps checked-out as part of a build that is orchestrated by
someone else). The 'local' reader will not download, nor copy anything. It will simply recognize the
presence of things.

The effect of having the 'local' reader discover source projects will be that those projects are
bound to your workspace. Nothing else will happen. This way, you can make several workspaces point
to the same set of physical files on disk.

Regards,
Thomas Hallgren




Carsten Pfeiffer wrote:
> Thomas Hallgren wrote:
>
> Hi Thomas,
>
> thanks for the quick response!
>
>> It should be. Simply point a provider with reader type "eclipse.import" to
>> the "site" that you use as source. A "site" is something that the
>> import.reader can understand. Typically a folder that contains a site.xml
>> (optional) and a features and plugins folder. Append ?importType=linked at
>> the end of the URL.
>
> I'm probably missing something, but I can't get this to work. I'm trying to
> import some plugins from one workspace into another. Here's my files:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <rmap
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://www.eclipse.org/buckminster/RMap-1.0"
> xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
> xmlns:mp="http://www.eclipse.org/buckminster/MavenProvider-1.0"
> xmlns:pp="http://www.eclipse.org/buckminster/PDEMapProvider-1.0">
>
> <searchPath name="default">
> <provider
> readerType="eclipse.import"
> componentTypes="eclipse.feature,osgi.bundle,buckminster,unknown "
> mutable="true"
> source="true">
> <uri format="file:/home/test/src/eclipse?importType=linked" />
> </provider>
> </searchPath>
>
> <!-- all components use the same search path -->
> <locator pattern=".*" searchPathRef="default" />
> </rmap>
>
> ========
>
> <?xml version="1.0" encoding="UTF-8"?>
> <cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0"
> resourceMap="file:/home/test/test-rmap.rmap">
> <cq:rootRequest name="de.gebit.some.plugin"
> componentType="osgi.bundle"/>
> </cq:componentQuery>
>
>
> Executing the query resolves the plugin just fine, popping up a wizard,
> where I select "workspace" as destination type. Now whether I enter the
> workspace location under "Location" or under "Workspace" (is the latter
> supposed to be a workspace-relative path?) doesn't matter, the plugin is
> not linked into the new workspace, but instead a plugins-folder is created
> in the workspace, and the plugin is copied into that.
>
> I.e. when I enter /tmp/ws as workspace "location" and press finish, I get
> /tmp/ws/plugins/de.gebit.some.plugin/... as a result.
>
> Not quite what I expected :-}
>
> And when I manage to get this running (presumably with your help :-), I'll
> be wondering how to do this not just with plugins, but with plain eclipse
> java projects. I.e. link-import some java projects from one workspace into
> another.
>
> Thanks,
> Carsten
Previous Topic:Dealing with an Unbound class container during build
Next Topic:Relative (File) URL to RMAP in CQUERY
Goto Forum:
  


Current Time: Fri Apr 26 01:12:48 GMT 2024

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

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

Back to the top