Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Proposals » OSGi Enterprise Tools » Exporting a bundle with dependencies with another bundles(Exporting a bundle with dependencies with another bundles)
Exporting a bundle with dependencies with another bundles [message #779782] Mon, 16 January 2012 14:54 Go to next message
Pablo G is currently offline Pablo GFriend
Messages: 1
Registered: January 2012
Junior Member
I have this OSGI configuration:

My config.ini is like this:

osgi.bundles=org.eclipse.equinox.common@2:start, \
    org.eclipse.update.configurator@3:start, \
osgi.clean = true

So, AFAIK, when I execute

java -Xms256M -Xmx1280M -jar osgi-3.4.2-R34x_v20080826-1230.jar 

It reads config.ini so with equinox.common and update.configurator bundles it "detects" all bundles deployed in /plugins folder. After that, the ConfiguratorModule (a custom bundle) just reads all bundles in the context and executes start method of each one (bundleA and bundleB). I have an eclipse project (bundleC), which uses some clases defined in bundleA and bundleB, so the MANIFEST.MF is:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: BundleC Plug-in
Bundle-SymbolicName: com.test.bundlec
Bundle-Version: 1.0.0
Bundle-Activator: com.test.bundlec.Activator
Import-Package: javax.naming,javax.sql,org.osgi.framework;version="1.3
Bundle-ClassPath: .
Require-Bundle: com.test.BundleA;bundle-version="1.0.0",

So, I want to generate a plugin (jar) file for the bundleC project. As there are two bundles in the "Require-bundle" option, those projects (BundleA and BundleB) should be in the bundleC classpath, isn´t it? So, in that case, I just generate the bundle (by exporting it as "Plugin Development") and place the new bundle in the plugin folder. Is there something I'm missing?

Well, in case all I´ve said is correct, here is my problem. I have the plugin jar file for BundleA and BundleB but I don´t have the source code of them, so I get an error when exporting BundleC to a jar plugin because, as it seem obvious, it can´t find the required classes it uses from BundleA and BundleB. Is there any way to generate the plugin without those required-bundles in the classpath?

I´ve tried to "decompile" them and then create the projects, and adding them in the classpath of BundleC. I can generate the plugin, but I guess there's a simple and correct way to achieve that.

Thanks for your answers
Re: Exporting a bundle with dependencies with another bundles [message #810594 is a reply to message #779782] Thu, 01 March 2012 09:50 Go to previous message
Kris Reid is currently offline Kris ReidFriend
Messages: 5
Registered: February 2012
Junior Member
Did you work out a solution?
Previous Topic:export product to linux - segmentation fault
Next Topic:Installation path containing bracket issue
Goto Forum:

Current Time: Mon Dec 11 04:20:21 GMT 2023

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

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

Back to the top