OSGi and OSMORC
In this section:
IntelliJ IDEA lets you create OSGi-based applications using Osmorc plugin. IntelliJ IDEA also lets you import Bnd/Bndtools projects. You can create a project with the OSGi support, add a module with the OSGI support to the existing project, or add the OSGi support to an existing module.
Before you start working with OSGi, make sure that the Osmorc plugin is enabled. The plugin is bundled with IntelliJ IDEA and is activated by default. If the plugin is not activated, enable it on the Plugins page of the Settings / Preferences Dialog as described in Enabling and Disabling Plugins.
Creating a project or module with OSGi support
To create a project or module with OSGi support
Do one of the following:
If you are going to create a new project:
click Create New Project on the Welcome screen or
select File | New | Project.
As a result, the New Project wizard opens.
If you are going to add a module to an existing project:
open the project you want to add a module to, and
select File | New | Module.
As a result, the New Module wizard opens.
- If you are going to create a new project: click Create New Project on the Welcome screen or select File | New | Project.
first page of the wizard,
in the left-hand pane, select
Java. In the right-hand part of the page, specify Project SDK and select OSGi from the list.
In Libraries area specify OSGi library settings:
- Use library - select this option to specify the existing OSGi library.
- Download - select this option to download the library. You can click Configure to edit downloading options.
- Set up library later - select this option to configure the library later in your project.
- Specify the name and location settings. For more information, see Project Name and Location or Module Name and Location.
Adding OSGi support to the existing module
- In the project tree right-click the module to which you want to add the OSGi support.
- From the drop-down list select Add Framework Support.
- In the dialog that opens,from the left-hand pane, select OSGi.
- On the right side of the page, in the Libraries area, specify OSGi library settings.
The OSGI library settings are as follows: