Running OSGi from IDEA

I am developing a scala application using IntelliJ IDEA. I would like my application modules to be OSGi packages. In Eclipse, you can create a project that is a scala project and a plug-in. Eclipse also supports the launch of the Equinox platform and provides an excellent configuration tool from which bundles are collected and how to do it. But I cannot use Eclipse because of the bad and slow scala plugin, so I need to use IntelliJ IDEA. In IDEA, I tried Osmorc to run OSGi, but this solution is very immature and does not work. What are other ways to launch and configure an OSGi application from IDEA?

+8
scala intellij-idea osgi equinox
source share
3 answers

Inaccurate answer, but one of the possibilities:

(All thanks to the work of WeigleWilczek , including Heiko Seeberger , who contributes here )

+2
source share

All OSGi frameworks can run as standard Java processes. For example, to run Felix:

java -jar path/to/felix.jar 

To start Equinox:

 java -jar path/to/org.eclipse.osgi_version.jar 

And so on.

Unfortunately, the initial configuration differs significantly between the implementation of the structure. For Felix, you need the config.properties , which is usually found in the conf directory of the Felix installation directory (or you can set the felix.config.properties system property to specify it elsewhere).

+2
source share

I use the PAX leader from Intellij IDEA to provide (deploy) the OSGI packages for Apache Felix and it starts the framework, but it is very annoying: first I have to run "mvn install" and then stop pax and then restart it - for every change that I do bundled. There has to be a better way...

0
source share

Source: https://habr.com/ru/post/650402/


All Articles