Hi *,

today on my way home from work I had an idea how to improve my
development cycles. I was not happy with the way bundles are updated in
the osgi runtime. In my case I build the plugin with maven (maven bundle
plugin), install it into the local maven repo and then install it with
the osgi console (install file:/...) or update it respectively. Too much
typing for me.

No my idea:
1. Create a osgi bundle which starts a basic http server on some port.
2. Create a maven plugin, which connects to this server and tells it,
which bundle has to be replaced and where the new file can be found on
the filesystem. The server bundle will then have a look, if the bundle
is installed.
if it is, it will be uninstalled. Then the new bundle will be installed
and started.

One hour of hacking and now I have a one-click bundle deployment.
You can find the osgi bundle and the maven plugin here (public domain
for now). WARNING: This is just a prototype!

http://hampelratte.org/zeugs/bundle-hotswap.tar.gz
http://hampelratte.org/zeugs/maven-osgi-hotswap-plugin.tar.gz

Usage: mvn package osgi-hotswap:hotswap

What do you think?

Cheers
Henrik

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to