Compiling and running an OSGI application in Eclipse

The foundation of our enterprise application is OSGI, and we have several Java projects that are logically related OSGI packages. We use Maven to compile the application using the Maven Bundle plugin. But this process takes a lot of time and makes it impossible to debug the application. We also use Runner and Pax plugins (: provison) to launch the application. If we could rely on the Auto build Eclipse feature and also debug the application, this would make our life easier. Is there a way to configure Eclipse to compile (and can be run) OSGI-based applications?

+5
source share
4 answers

I'm not quite sure if you understand you, but here it goes.

Well, running / debugging OSGi applications in Eclipse is very easy if your packages are in projects with PDE support, or at least are on your target platform.

Do you have a source for all of your packages? Sourceless debugging is not that useful. If you do, can you just import the entire source of your packages into the Eclipse workspace?

Otherwise, you can create a target platform, add all your packages to it. (as the first attempt, I would say, dump all your packages in the directory and specify the target platform there)

In any case, you should be able to run (or debug) โ†’ OSGi framework โ†’ Create โ†’ Select your packages โ†’ Start

You can choose packages or a target platform from your workspace.

+5
source

Eclipse (PDE). , Eclipse OSGi. Eclipse - OSGi .

, , OSGi, , PDE.

+3

maven bundle, , PDE- ( , , IDE , ).

. , PDE Eclipse Tycho maven. Tycho , PDE, . , maven bundle bndtools Eclipse. bundle, bndtools , . , , bndtools , PDE, - , , . - - .

+1

Take a look at bndtools. bndtools uses the same bnd that underlies the maven bundle plugin. You can even use bndtools with m2e. bndtools are available on the Eclipse market.

+1
source

All Articles