IntelliJ IDEA 14.0.0 Web Help

OSGi Facet Page

File | Project Structure | Modules - module - OSGi facetCtrl+Shift+Alt+S projectStructure

Use this page to configure support of OSGi bundles generation.

The available tabs are:

General tab

Item Description
Bundle Creation In 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 Synchronization In 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

Item Description
JAR filename Use this field to specify the name of your bundle JAR file.
JAR output path Use 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 JAR Select this check box to have the OSGi bundle JAR file rebuilt upon every module make.
Additional JAR Contents In 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.
  • add (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.
  • edit1 (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.
  • delete (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

Item Description
Symbolic Name In this text box, specify an alias to refer to the bundle.
Bundle Activator In 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 Version In this text box, specify the version of the framework integrator used.
Additional Properties In 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:

Web Resources:

Last modified: 12 November 2014
comments powered by Disqus