8

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?

Wojciech Durczyński
  • 2,627
  • 2
  • 16
  • 11

3 Answers3

2

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

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

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    That'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
2

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).

Neil Bartlett
  • 23,743
  • 4
  • 44
  • 77
0

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...

Alex
  • 2,589
  • 3
  • 35
  • 44