eLuzien (Eclipse Plug-in for OSGi bundle development)

Welcome to eLuzien

eLuzien



eLuzien is an Eclipse plug-in designed to integrate the development of OSGi bundles. The plug-in builds upon the strengths of the Eclipse platform and integrates the whole development process of an OSGi bundle.

eLuzien has been developed at the Departamento de Ingeniería Telemática (DIT) of the Universidad Politécnica de Madrid (UPM), Spain.

License

eLuzien is distributed under the GNU Lesser General Public License, LGPL, for detailed information visit LGPL

OSGi

The Open Services Gateway initiative (OSGi) is an independent consortium launched, in 1998, by more than fifty companies in the area of embedded systems, with the aim to develop a series of open specifications for a Java based service platform, able to act as a gateway between Internet and the local area networks that can be found at home, at a car, and other types of constrained environments.

The third release of this specification defines a service platform (an instantiation of a Java virtual machine, an OSGi framework and a set of running services) that includes a minimal component model and a small framework for managing components, including a packaging and delivery format.


Eclipse

Eclipse is an open source community whose projects are focused on providing an extensible development platform and application frameworks for building software. Eclipse provides extensible tools and frameworks, allowing to create flexible development tools that that span the software development lifecycle.


Usage

Create a new OSGi bundle project

Once the plug-in has been installed the first thing we will want to do is to create a new OSGi bundle project. To do so: choose New -> OSGi -> OSGi Bundle Project in the New... Menu. Once you select it you can edit the project's name and its location in the workspace. In the second page  you can edit the project's Java build settings, as with any other Java project. Finally, the last page allows you to fill the initial values for the general information fields of the bundle manifest.

When you click finish a new project will appear in your workspace, with the osgi.jar library inside the project and an Ant build.xml file so you can copy the project folder and continue the development outside Eclipse. The plugin also creates the bundle's manifest.mf file and opens it in the editor

The manifest editor

Editor General Tab

The editor for the manifest file has three tabs:

  • The first tab contains fields for editing the general information fields of the manifest. It also lets the user to edit the bundle's activator class and create it if needed by launching a wizard. It also lets the user to create a new service and automatically update the manifest to export it. Finally the user can create the project's bundle jar file in order to export it, by clicking at the create the bundle button. Editor Imports Tab
  • The second tab assists the user in the edition of the import-package, export-package and bundle-classpath manifest properties. The value of each property can be edited by checking/unchecking the elements of a table. The imports table lists all the packages that match to the import declarations in the project's source code as well as the existing entries in the manifest, and hints the user about each package's origin. These are the descriptions of the package origin names:
    • SOURCE: The package is part of the project's source code.
    • JRE: The package is part of the libraries of the Java Runtime Environment.
    • PROJECT LIBRARY: The package is provided by a library inside the project
    • EXTERNAL: The package comes from a source that is not part of the project.

    If the user is not sure about which classes need to be imported he can click the button 'Automatically resolve imports' and the plug-in will check the entries it thinks are needed. This classification should be ussed as a guideline, as it may not be 100% right. The user is free to change it as it deems neccesary.

    There are buttons next to each table which let the user to add more elements to the manifest entries. When the user clicks one of the buttons a dialog will open where the user can select the desired element to be added to the table. The dialog from the export-package section has an additional feature: If the user selects a library file instead of a package all the packages contained in the library will be added.

  • The third tab shows the raw data of the manifest.mf file. It should only be used by experts or when the user needs to add a field that he can't edit with the other two pages.

Note: the editor does not listen to the changes made outside of it to the manifest, or to the project files. If the user wants that the editor reflects those changes he has to reopen the manifest file.

The generate bundle wizard

Generate Bundle Wizard

If the user wants to export one of the project bundles he can use the generate bundle wizard available in the first tab of the manifest editor, by clicking the 'generate bundle' button. The resulting dialog has fields for configuring th e destination folder, the name of the jarfile and the bundle contents. The manifest.mf is automatically added to the bundle. If the user does not select the source folder the Java files will not be exported. All files inside the embedded lib that are selected will be exported to the lib folder in the bundle structure.

Launching the framework

When the user wants to test his bundles he has to load the Launch Configuration Dialog ( Run/Run... in Menu). The left part of the dialog shows the existing configuration types. The user has to select 'OSGi Framework' and create a new configuration if no one exists. This dialog has four tabs:

  • Framework tab: The first tab let's the user to select which framework to run (in the current version they are Oscar 1.0.5 and Knopflerfish 1.3.3). The remaining controls of the tab let the user to configure the system properties that will be defined in order to configure the platform and the bundles. The user can freely add, modify or remove any property defined in either category. When the framework changes the framework properties are deleted and replaced by the new framework's default properties. User defined properties should go in the bundle properties part. Launch Configuration Framework Tab
  • Bundles tab: This tab let's the user to select which bundles will be installed in the framework. The tree lets the user to configure each bundle start level and start state(Installed or Active) The currenttly added bundles are shown in a tree and classified in three categories:
    • Framework bundles: These bundles are defined within the framework. If the user wants to modify the list he can add more with the 'Add Framework Bundle' button. When the user changes the selected framework in the first tab all these bundles are deleted and replaced by the default framework bundles of the substitute.
    • Workspace bundles: These are bundle projects created in the workspace with the new bundle project wizard. When the user creates a new launch configuration the plug-in will automatically add the selected project if it is an OSGi bundle project. The 'Add Project Bundle' button let's the user to add projects from the workspace to the list of bundles to launch.
    • External bundles: Finally the user can add jarfiles stored in his computer file system. The 'Add External Bundle' button launches a dialog that lets the user to find bundles in the file system.
    Launch Configuration Bundles Tab
  • JRE Tab: Allows the user to select the JRE which will be executed.
  • Common Tab: General launch configuration options.

The launch configurations are stored inside Eclipse, so the user can launch repeatedly the same configuration without having to set up all the parameters again.

Download

To automatically install the plug-in you have to add the following URL to your Eclipse remote update locations:

http://eluzien.forge.os4os.org/update

The full source code and binary distribution of eLuzien can be downloaded at OS4OS

Contact

Please send any comment, suggestion or problem report related to eLuzien using the forum at OS4OS.


Team

eLuzien has been developed in the context of the participation of the Departamento de Ingeniería Telemática (DIT) and of the Universidad Politécnica de Madrid (UPM) in the ITEA-FAMILIES project. eLuzien programs and documentation have been created by Felix Cuadrado with the collaboration of Manuel Santillan, Jose Luis Ruiz and Juan C. Dueñas. eLuzien has been the Master's Thesis of Felix Cuadrado in his studies of Telecommunication Engineering at the ETSIT-UPM, (Escuela Técnica Superior de Ingenieros de Telecomunicación).

Links

OSGi related

  • The OSGi alliance home page
  • OSCAR An open source implementation of the OSGi R3 platform
  • KNOPFLERFISH An alternative open source implementation of the OSGi R3 platform
  • EQUINOX The Eclipse project implementation of the OSGi R4 platform
  • JBONES An OSGi (and more) deployment engine and dependencies resolution framework developed at the DIT-UPM
  • JMOOD A JMX-based OSGi management agent implementation. Developed at the DIT-UPM
  • BarkIDS An OSGi home security application, based on video surveillance, also developed at the DIT-UPM

Other useful links

  • DIT Department of Telematics Engineering (Departamento de Ingeniería Telemática) at the UPM, where eLuzien has been developed.
  • UPM Universidad Politécnica de Madrid, the university to which the DIT belongs.
  • OS4OS Open Source For Open Services.


Last update: .    Accesses since October 25th, 2005:   counter  

Valid HTML 4.01!