开发者

how to create a simple osgi app with eclipse and maven plugin?

I have installed the m2eclipse plugin with galelio. I want to create a hello world osgi bundle with this setup. A开发者_如何学Pythonppreciate if someone could point me to some tutorial or give some direction.

currently i am using maven 2.2.1


here is a small OSGi tutorial (1) that helps you to see the main steps of OSGi bundle development.

Cheers, Dmytro

(1): http://blog.knowhowlab.org/2010/06/osgi-tutorial-from-project-structure-to.html


I do not know the eclipse way to create bundles (Plug-in Project) but I can recommend using the OPS4J Pax tools.

Try the Maven-Pax-Plugin (1) to create the bundle (pax:create-bundle (2))and than import the bundle to your eclipse workspace with Import... -> Maven -> Existing Maven Project. Run the bundle with pax:provision (3)

(1): www.ops4j.org/projects/pax/construct/maven-pax-plugin/index.html

(2): www.ops4j.org/projects/pax/construct/maven-pax-plugin/create-bundle-mojo.html

(3): www.ops4j.org/projects/pax/construct/maven-pax-plugin/provision-mojo.html

(As a new user I was not allowed to post more than one link - so I hat to provide the links as plain text without 'http://'. Sorry for that!)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜