Create OSGI-Spring Project with Maven

Introduction

This document is for developers who knows Java, but not familiar with new technologies such as Spring or OSGi.

Your First Spring-OSGi Project

In this section, you will learn how to create simple Spring + OSGi project with Maven.

Setup

For this tutorial, you need to install the following software:

Installation of Maven is simple. All you have to do is just download, unzip, and set path to the maven directory.

Procedure

mvn clean install pax:provision

Inside Your Bundle

Let's look into the code.

kono$ cd org.cytoscape.sample
kono$ ls -l
total 16
-rw-r--r--   1 kono  kono   201 Mar 11 17:36 osgi.bnd
-rw-r--r--   1 kono  kono  2656 Mar 11 17:36 pom.xml
drwxr-xr-x   4 kono  kono   136 Mar 11 17:36 src
drwxr-xr-x   6 kono  kono   204 Mar 11 17:54 target

This is the basic directory structure of Spring-OSGi project created by maven. In the following directory, you can see two XML files

}}}

Funding for Cytoscape is provided by a federal grant from the U.S. National Institute of General Medical Sciences (NIGMS) of the Na tional Institutes of Health (NIH) under award number GM070743-01. Corporate funding is provided through a contract from Unilever PLC.

MoinMoin Appliance - Powered by TurnKey Linux