Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » [PDE] Building OSGi bundle plugins for 3rd party jars?
[PDE] Building OSGi bundle plugins for 3rd party jars? [message #437525] Thu, 29 September 2005 15:42 Go to next message
Alex Fitzpatrick is currently offline Alex FitzpatrickFriend
Messages: 124
Registered: July 2009
Senior Member
I asked this question yesterday in the JDT newsgroup and didn't receive a
response, so I thought I'd repeat it here.

I've been working with one of my collegues to create plugin wrappers for
some of the 3rd party API we use so they're accessable to our RCP app. We
went through this exercise for our prototype under Eclipse 3.0 and at that
time the plugins were always expanded on the target machine. So if we
provided a wrapper for say, dom4j we'd end up with the following in a
deployed environment:

plugins
- com.cognos.org.dom4j_1.0.0
- dom4j.jar
- cognosdom4j.jar
- plugin.xml


When we construct the same wrappers in 3.1 there appear to be two
possibilities: If the jar files ARE listed in the classpath a structure
similar to the above:

plugins
- com.cognos.org.dom4j_1.0.0
- dom4j.jar
- cognosdom4j.jar
- META-INF
- MANIFEST.MF

If the jar files are NOT listed in the classpath we get a single jar file:

plugins
- com.cognos.org.dom4j_1.0.0.jar

And this jar file will have the structure - dom4j.jar
- cognosdom4j.jar
- META-INF
- MANIFEST.MF


Which of these results is correct? (Both?)

--
Alex
Re: [PDE] Building OSGi bundle plugins for 3rd party jars? [message #437617 is a reply to message #437525] Fri, 30 September 2005 04:09 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Alex Fitzpatrick wrote:

> I asked this question yesterday in the JDT newsgroup and didn't receive a
> response, so I thought I'd repeat it here.
>
> I've been working with one of my collegues to create plugin wrappers for
> some of the 3rd party API we use so they're accessable to our RCP app. We
> went through this exercise for our prototype under Eclipse 3.0 and at that
> time the plugins were always expanded on the target machine. So if we
> provided a wrapper for say, dom4j we'd end up with the following in a
> deployed environment:
>
> plugins
> - com.cognos.org.dom4j_1.0.0
> - dom4j.jar
> - cognosdom4j.jar
> - plugin.xml
>
>
> When we construct the same wrappers in 3.1 there appear to be two
> possibilities: If the jar files ARE listed in the classpath a structure
> similar to the above:
>
> plugins
> - com.cognos.org.dom4j_1.0.0
> - dom4j.jar
> - cognosdom4j.jar
> - META-INF
> - MANIFEST.MF
>
> If the jar files are NOT listed in the classpath we get a single jar file:
>
> plugins
> - com.cognos.org.dom4j_1.0.0.jar
>
> And this jar file will have the structure - dom4j.jar
> - cognosdom4j.jar
> - META-INF
> - MANIFEST.MF
>
>
> Which of these results is correct? (Both?)
>
You can't make jarred plugin for 3rd jars - it will not work
Re: [PDE] Building OSGi bundle plugins for 3rd party jars? [message #437659 is a reply to message #437525] Fri, 30 September 2005 16:10 Go to previous message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
You've got a couple of options:

1) Unpack the contents of your 3rd party libraries into your plugin, and then when it's Jared up, they'll be accessible
2) Define external plugins (e.g. dom4j_1.0.0) and have your plugin depend on them

The second approach allows your code to be sent as a packed plugin/jar, whilst the dom4j is an unpacked plugin. However, since packed plugins run faster, having the dom4j plugin as a packed plugin probably makes sense.

Lastly, the benefit of making the dependencies explicit in the plugins is that if dom4j is updated on its own, you don't have to download everything else; you can just ship the dom4j update.
Previous Topic:Customize window layout of menu bar
Next Topic:Simple RCP application with one Resource navigator view not working?
Goto Forum:
  


Current Time: Fri Dec 13 22:09:11 GMT 2024

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

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

Back to the top