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?
3 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)
-
1That's not an answer for my question. I asked: how to configure which bundles should be started and how to start them from IDEA. – Wojciech Durczyński Dec 23 '10 at 11:48
-
@Wojciech: I thought so (hence the "not an exact answer"). I know about starting modules from bnd configuration and sbt project, but not directly from an IDEA-OSGi environment. I hope others have a better configuration to propose. – VonC Dec 23 '10 at 12:28
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).

- 23,743
- 4
- 44
- 77
-
But how to generate bundles list easily (with run levels etc.)? – Wojciech Durczyński Dec 28 '10 at 14:32
-
I'm using PAX runner from inside Intellij IDEA to provision (deploy) OSGI bundles to Apache Felix and run the framework, but this is very annoying: I have to run "mvn install" first, then stop the running pax provisioning session, then restart it - for every change I make in the bundle. There got to be be a better way...

- 2,589
- 3
- 35
- 44