IntelliJ IDEA 2017.1 Help

OSGi Facet Page

File | Project Structure | Modules | <module> | OSGi
File | Project Structure | Facets | OSGi (<module>)


Use this page to configure support of OSGi bundles generation.

The available tabs are:

General Tab

ItemDescription
Bundle CreationIn this area, specify the bundling method and appoint the OSGi Bundle manifest file to use (or specify the way to create a new one). The available options are:
  • Create manifest using facet settings and bundle using facet configuration - select this option to have bundles assembled according to the configuration settings specified in the Bundle JAR tab and the manifest file generated according to the settings of the Manifest Generation tab.
  • Use existing manifest and bundle using facet configuration - select this option to have bundles assembled according to the configuration settings specified in the Bundle JAR tab and use an existing manifest file of your choice.
    In the Manifest file location area, appoint the manifest file to apply.
    • Select the Use project default option to use the manifest file that is appointed default for the current project in the OSGi: Project Settings dialog box.
    • Alternatively, select Custom option to use a custom manifest file. In the text box, type the path to the desired file relative to the project root or click the Browse button browseButton.png and choose the desired location in the dialog that opens.
  • Create using bnd and ignore facet configuration - select this option to have bundles assembled using the bnd.
    In the Bnd file location text box, specify the path to the .bnd file to use. Type the path manually or click the Browse button browseButton.png and choose the desired location in the dialog that opens.
  • Create using Bundlor and ignore facet configuration - select this option to have bundles assembled using Bundlor. Bundlor helps you simplify the creation and maintenance of the OSGi metadata of each bundle.
    In the Bundlor file location text box, specify the path to the file to use. Type the path manually or click the Browse button browseButton.png and choose the desired location in the dialog that opens.
Maven SynchronizationIn this area you can select the following option:
Do not synchronize facet settings with Maven - if you select this check box, OGGi facet settings will not be synchronized with Maven. It might be helpful if you want to save facet settings that are different from the settings in pom.xml file when you reimport from the Maven project.

Bundle JAR Tab

ItemDescription
JAR filenameUse this field to specify the name of your bundle JAR file.
JAR output pathUse this area to specify the location of the bundle JAR file. You can select from the following options:
  • Place in module's output path - select this option to place the OSGi bundle JAR in module's output path.
  • Place in project-wide OSGi bundle output path - select this option to place the bundle JAR in project's output path that you specified in the OSGi: Project Settings dialog box.
  • Place in this path - select this option to place the OSGi bundle JAR manually. You can either type the location in text field or click the Browse button browseButton.png and choose the desired location in the dialog that opens.
Always Rebuild Bundle JARSelect this check box to have the OSGi bundle JAR file rebuilt upon every module make.
Additional JAR ContentsIn this area, specify extra sources to be packaged into the JAR and the target location where to store the packaging results.
  • Source File/Folder - this read-only field shows the full path to the sources to package.
  • Destination File/Folder (Relative to JAR Root - this read-only field shows where to place the packaging results.
  • /help/img/idea/2017.1/new.png (Alt+Insert) - use this icon or shortcut to open the Choose Source File or Folder dialog box, where you can specify the desired extra sources to be included in the JAR file.
  • /help/img/idea/2017.1/edit1.png (Enter) - use this icon or shortcut to open the Choose Source File or Folder dialog box, where you can choose a different extra source file or folder.
  • /help/img/idea/2017.1/delete.png (Alt+Delete) - use this icon or shortcut to remove the selected source - destination mapping from the list.
File Ignore Pattern (regex)Use this field to exclude items you do not need from the JAR file after the compilation. Bundles are assembled using bnd tool. This parameter acts as bnd directive -donotcopy.
For example, you usually do not copy CVS and .svn directories. So, the default, in this case, is (CVS|.svn). The syntax for the parameter is as follows:
-donotcopy= (CVS|.svn|.+.bak|~.+)

Manifest Generation Tab

ItemDescription
Symbolic NameIn this text box, specify an alias to refer to the bundle.
Bundle ActivatorIn this text box, specify the class that implements the OSGi activator. Type the class name or click the Browse button browseButton. and choose it in the Select Bundle Activator Class dialog box, that opens.
Bundle VersionIn this text box, specify the version of the framework integrator used.
Additional PropertiesIn this text box, type additional properties to be included in the manifest.mf manifest file. Syntax highlighting, auto-completion, and intention actions are available.

See Also

Reference:

External Links:

Last modified: 18 July 2017