Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » OSGI / SPI - sharing 3rd party JARs between plugins
OSGI / SPI - sharing 3rd party JARs between plugins [message #335171] Tue, 24 March 2009 22:44 Go to next message
Jeff S. is currently offline Jeff S.Friend
Messages: 29
Registered: July 2009
Junior Member
Hello!

I'm looking for some help/direction on how to "share" 3rd party JARs
between plugins, when the JARs/plugins rely on SPI.

I posted my original question on the eclipse.platform.pde newsgroup. It
was suggested I try posting here. Original Question:
http://www.eclipse.org/newsportal/article.php?id=1306&gr oup=eclipse.platform.pde#1306

I've also made 3 small plugins to demonstrate my issue. If you have time,
please check out this page:
http://www.skratchdot.com/eclipse/plugins/

I believe my real question relates to OSGI/SPI. I'm not sure how to make
a plugin be seen as "dependent" when none of it's classes are explicitly
referenced in code.

In my specific example, I need a way to "register" the following service
providers in my "View" plugins:
META-INF/services/javax.sound.sampled.spi.AudioFileReader
javazoom.spi.mpeg.sampled.file.MpegAudioFileReader
javazoom.spi.vorbis.sampled.file.VorbisAudioFileReader

I would then like to make my "View" plugins dependent on the "jLayer"
plugin which exposes the "javazoom.spi.*" classes.

Since the "View" plugins don't explicitly reference the "jLayer" plugin
via .java code, Eclipse assumes that the "View" plugins aren't dependent
on the jLayer plugin.

I thank you for any help you can provide!

-jeff
Re: OSGI / SPI - sharing 3rd party JARs between plugins [message #335176 is a reply to message #335171] Wed, 25 March 2009 08:32 Go to previous message
Jeff S. is currently offline Jeff S.Friend
Messages: 29
Registered: July 2009
Junior Member
Disregard this post. I've figured out my problem.

To get a plugin to recognize my "third party JAR" jLayer plugin, I did
this:

1) Create plugin from existing JARs. I named this plugin "jLayer". I
made sure the "META-INF/services" folder had the correct entries in it.

2) Now, I copied the "META-INF/services" folder from the jLayer plugin, to
the plugin that requires the services defined in the jLayer. I then added
the jLayer as a "required" plugin.

Problem solved!
Previous Topic:adding RCP dev capabilities into JEE distribution
Next Topic:View creation at application startup
Goto Forum:
  


Current Time: Thu Mar 28 19:50:44 GMT 2024

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

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

Back to the top