State of OSGi support?

Answered

Hi

I enabled this Osmorc plugin, and created a simple project. It builds an OSGi bundle jar but I don't see any settings to control what packages are exported from the bundle. Do I need to use external tools like bnd or maven plugins for that kind of thing, or is it hidden in the IDE here somewhere?

thanks,
Rob

[I tried to post this earlier, but I think it failed. Sorry if it's a dupe.]

0
3 comments

You can find the settings in the OSGi facet: https://www.jetbrains.com/help/idea/2017.1/osgi-facet-page.html.

If you choose the first option, you can specify the packages to export in the Manifest Generation tab, Additional properties:

It's also possible to use bnd or Maven for the manifest file generation.

Does it help?

1

Thanks. That's helping me get started, but it seems pretty minimal. I can't seem to add multiple lines to either the Import-Package or Export-Package header, so as they get long, they scroll off screen horizontally.

Also, if code uses another module's private classes, there is no compile-time error, but it fails as expected when I try to start the bundle in Apache Felix. It would be better if the IDE reported the error at compile time.

I'll try bnd and Maven next. Or maybe Java 9 modules.

Rob

0

Please sign in to leave a comment.