OSGiUserStories

Revision as of 17:30, 2 April 2010 by Anebuzelsky (Talk | contribs)

Contents

OSGi User Stories (since NetBeans 6.9)

This page lists the user stories for NB OSGi integration, meaning we look at how the user would accomplish several key goals.

Consume OSGi Bundle in NB RCP App

As a user, I have an existing OSGi bundle that I want to use in a NetBeans RCP application. (This bundle could be something I'm already using in some other part of my architecture, or some publicly available open source library that is packaged as an OSGi bundle.)

Using Ant

Project setup

  • module projects and module suite project are open in the IDE, created from the new project templates under NetBeans Modules category (Module, Module Suite, NetBeans Platform Application)
  • if the user wants also one of his modules to be loaded by Felix at runtime, not by NetBeans module system, the user can check Generate OSGi bundle checkbox at the last panel of new Module project wizard

Development (adding file types, working with layers, etc.)

  • the existing OSGi bundles are present in a folder on user's disk as JARs
  • in the module suite project's Properties on Libraries panel a new cluster with the OSGi bundles needs to be added as a dependency; Add Cluster action offers the user to Import a Cluster and generate configuration files for the bundle JARs when the user points to the folder with bundle JARs
  • user is adding dependencies and using NetBeans APIs in all his module and module suite projects the usual way

Building

  • user builds his modules and module suites the usual way

Debugging and Running including reloading modules after I make changes

  • Run, Debug actions on module suite project run an external instance of the Platform with the module suite's projects and all dependencies as usual
  • Install/Reload in Development IDE on module project installs and reloads the module and its dependencies in the current IDE as usual

Using Maven

Project setup

  • module projects and application project are open in the IDE, created from the new project templates under Maven category (Maven NetBeans Module, Maven NetBeans Application)
  • only the Maven NetBeans Module with the option "Allow OSGi bundles as dependencies" checked can have a dependency on an OSGi bundle

Development (adding file types, working with layers, etc.)

  • the existing OSGi bundles are present in a Maven repository (either a local repository or in a remote repository)
  • the Maven NetBeans Module using OSGi can have any OSGi bundle artifacts from any Maven repository added as its dependency
  • user is adding dependencies and using NetBeans APIs in his module projects the usual way

Building

  • user builds his modules and application the usual way

Debugging and Running including reloading modules after I make changes

  • Run, Debug actions on the NetBeans Platform Application project run an external instance of the Platform with the module projects and all dependencies as usual
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo