For reasons of compatibility with an external product, I need to build a RCP application which must include 2 versions of a plugin. The plugin is org.apache.lucene which is currently 1.9.1 in eclipse 3.4. I need version 1.4.103 in order to be compatible with the other application. I should say that my RCP app was originally developed using eclipse 3.2 and after upgrading to 3.4 this problem arose.
During development and test my app worked ok. I had to add the 1.4.103 plugin by hand in the Run configuration but otherwise it ran ok.
Now I am at the Build Product stage and cannot find a way to add the 2 versions of the Lucene plugin in the Configuration tab of the Product wizard. At runtime an error indicates that the 1.4.103 version of Lucene is missing.
Consider that, in OSGi, bundles have no concept of direct dependence between bundles.
Instead, each bundle lists the services and packages it expects to be registered by other bundles via the "Import-Package" and "Import-Service" headers.
On the opposite side, a bundle lists what services and packages it plans to export via "Export-Package" and "Export-Service". Thus, there are no hard dependencies between bundle implementations. As long as some bundle provides your imported packages your bundle will be happy.
As an illustration, WTP (Web Tools Platform) has Duplicated javax.wsdl plugins:
Now you should make sure you have converted your 3.2 Plugin project with the sub-menu "PDE tools" (right click on your project).
Then you may define an product for your rcp application, in which you will define a configuration (target) for runtime, as opposed to a development target.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With