Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launching OSGi from IDEA

I develop scala application using IntelliJ IDEA. I'd like my application modules to be OSGi bundles. In Eclipse it is possible to create a project which is both scala project and plug-in project. Eclipse also supports launching of Equinox platform and provides great configuration tool of which bundles to start and how. But I can't use Eclipse because of poor and slow scala plugin, so I need to use IntelliJ IDEA. In IDEA I tried Osmorc for running OSGi but this solution is very immature and doesn't work well. What are the other ways of launching and configuring an OSGi application from IDEA?

like image 375
Wojciech Durczyński Avatar asked Dec 23 '10 09:12

Wojciech Durczyński


2 Answers

Not an exact answer, but one possibility would be to:

  • set up a scala project with sbt and Intellij
  • use bnd4sbt (It enables you to create OSGi bundles for your SBT projects)
  • use scalamodules (a domain specific language for OSGi development)

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

like image 51
VonC Avatar answered Oct 17 '22 05:10

VonC


All the OSGi frameworks can be launched as standard Java processes. For example to launch Felix:

java -jar path/to/felix.jar

To launch Equinox:

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

And so on.

Unfortunately the initial configuration differs substantially between framework implementations. For Felix you need a config.properties file, which is typically in the conf directory of the Felix installation directory (or you can set the felix.config.properties system property to point it elsewhere).

like image 24
Neil Bartlett Avatar answered Oct 17 '22 05:10

Neil Bartlett