You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Henrik Niehaus <he...@gmx.de> on 2009/10/22 21:24:53 UTC

One click bundle deployment with maven

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: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: One click bundle deployment with maven

Posted by "Edelson, Justin" <Ju...@mtvstaff.com>.
+1

mvn sling:install does this just fine and despit the name doesn't  
depend on Sling.

I usually bind it to the install phase with a profile so

mvn -P sling install

Does both the install to the local maven repo and the install to Felix.

Justin

On Oct 22, 2009, at 3:36 PM, "Felix Meschberger" <fm...@gmail.com>  
wrote:

> Hi Henrik,
>
> Sounds interesting.
>
> In Apache Sling we have followed a similar approach: We have a plugin,
> we call it the Maven Sling Plugin, which can install (or update) a
> bundle directly into the OSGi framework by leveraging the HTTP API
> provided by the Web Console.
>
> You find more information on the Maven Sling Plugin at [1].
>
> Regards
> Felix
>
> [1] http://sling.apache.org/site/sling.html
>
>
> Henrik Niehaus schrieb:
>> 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: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: One click bundle deployment with maven

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Henrik,

Sounds interesting.

In Apache Sling we have followed a similar approach: We have a plugin,
we call it the Maven Sling Plugin, which can install (or update) a
bundle directly into the OSGi framework by leveraging the HTTP API
provided by the Web Console.

You find more information on the Maven Sling Plugin at [1].

Regards
Felix

[1] http://sling.apache.org/site/sling.html


Henrik Niehaus schrieb:
> 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: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org