Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Using P2 to deploy plugins with fragments
Using P2 to deploy plugins with fragments [message #482747] Thu, 27 August 2009 14:42 Go to next message
Del Myers is currently offline Del Myers
Messages: 82
Registered: July 2009
Member
Hi,

So, I have a feature that contains a set of plug-ins, one of which requires a
fragment for native code. I want to be able to deploy this feature using p2, but
I'm running into problems. I'm figuring it has to do with the fact that I'm
trying to use a fragment.

Anyway, I did some digging and found that I have to create a p2.inf file for the
plug-in that requires the fragment and for the fragment that provides a
capability. This is what I came up with:


in the plug-in's p2.inf:

requires.0.namespace=ca.uvic.chisel.javasketch.iu
requires.0.name=jvmti.implementation
requires.0.greedy=false
requires.0.range=0.0.1


in the fragment's p2.inf:

provides.0.namespace=ca.uvic.chisel.javasketch.iu
provides.0.name=jvmti.implementation
provides.0.version=$version$



But when I try to run the "Features" export wizard, and install into the host, I
get this error during installation:

---
Could not find the exported unit with id:
ca.uvic.chisel.diver.feature.feature.group version: 0.0.1.200908271035
--

That is, everything seems to get built fine, but it won't install. I have no
idea why. The error isn't helpful to me because I don't know what is going on
behind the scenes. Any ideas?

I'm pretty much flying blind with all of the p2 metadata stuff. I've read the
sections in the documentation, particularly "Customizing metadata", but it
doesn't telly you anything about what each of the properties actually does, so
I'm a little confused. Thanks.
Re: Using P2 to deploy plugins with fragments [message #482775 is a reply to message #482747] Thu, 27 August 2009 18:00 Go to previous message
Del Myers is currently offline Del Myers
Messages: 82
Registered: July 2009
Member
OK, I figured it out, and I'm writing it here for prosperity.

The problem was in the fact that my fragment didn't publish its architecture
details properly. In the filter's section on the overview page, I had to put (&
(osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86)). That made it so that the
export function wouldn't filter it out of the export. So, that's fixed.

Del

Del Myers wrote:
> Hi,
>
> So, I have a feature that contains a set of plug-ins, one of which
> requires a fragment for native code. I want to be able to deploy this
> feature using p2, but I'm running into problems. I'm figuring it has to
> do with the fact that I'm trying to use a fragment.
>
> Anyway, I did some digging and found that I have to create a p2.inf file
> for the plug-in that requires the fragment and for the fragment that
> provides a capability. This is what I came up with:
>
>
> in the plug-in's p2.inf:
>
> requires.0.namespace=ca.uvic.chisel.javasketch.iu
> requires.0.name=jvmti.implementation
> requires.0.greedy=false
> requires.0.range=0.0.1
>
>
> in the fragment's p2.inf:
>
> provides.0.namespace=ca.uvic.chisel.javasketch.iu
> provides.0.name=jvmti.implementation
> provides.0.version=$version$
>
>
>
> But when I try to run the "Features" export wizard, and install into the
> host, I get this error during installation:
>
> ---
> Could not find the exported unit with id:
> ca.uvic.chisel.diver.feature.feature.group version: 0.0.1.200908271035
> --
>
> That is, everything seems to get built fine, but it won't install. I
> have no idea why. The error isn't helpful to me because I don't know
> what is going on behind the scenes. Any ideas?
>
> I'm pretty much flying blind with all of the p2 metadata stuff. I've
> read the sections in the documentation, particularly "Customizing
> metadata", but it doesn't telly you anything about what each of the
> properties actually does, so I'm a little confused. Thanks.
Previous Topic:Text formatting with label provider
Next Topic:Restrict editing to specific partitions
Goto Forum:
  


Current Time: Tue Sep 02 08:01:27 EDT 2014

Powered by FUDForum. Page generated in 0.03375 seconds