2

I'm involved in transitioning a stand-alone application into the Eclipse E4 RCP framework. The application has a lot of "core" functionality that depends on external libraries which are currently resolved using Maven. There is actively development on this "core" so we'd like to keep it as an active project in the IDE as we proceed.

Ideally, we'd like this core to be available in the target platform so developers can focus on transitioning the UI elements from standalone Swing elements to RCP parts.

The problem I'm facing is regarding dependencies that we used to resolve through Maven in the core of the application. MyApp.Core has dependencies on external libraries LibraryA, LibraryB, .... As a plugin project, I can only export the packages within MyApp.Core and not any of the packages available in LibraryA, LibraryB, .... However, when I try to use functionality in MyApp.Core that depends on these libraries through the plugins responsible for the various parts of the application, I get, as probably expected, a ClassNotFound exception because the packages in the dependent libraries aren't exposed anywhere.

Can anyone help me setup the RCP application, the target platform, etc. for this situation?

Thanks!

anishthecoder
  • 940
  • 6
  • 20
  • Have you seen [Non-osgi library usage in an osgi application](http://stackoverflow.com/q/4931292/1744774) already? – Gerold Broser Apr 17 '17 at 04:27
  • @GeroldBroser Yes, I did check that. My issue with the approaches suggested there is `MyApp.core` is a project for which we will often be changing / upgrading dependent libraries. I'd like to avoid having to repackage the dependent libraries as OSGi bundles as such everytime we make a change like that. – anishthecoder Apr 17 '17 at 04:40
  • It's a while ago that I was involved in an OSGi project, but doesn't the [Maven Bundle Plugin (BND)](https://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html) take care of creating the bundles' `jar`s if configured properly in the project's POM? And, BTW, I'd take the "dabbler" out of [your profile](http://stackoverflow.com/users/2821477/anishthecoder). One who deals with OSGi isn't a dabbler at all. :) – Gerold Broser Apr 17 '17 at 20:49

0 Answers0