You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Christian Schneider <ch...@die-schneider.net> on 2016/07/13 10:01:38 UTC

[Discuss] Providing typical felix dependencies as a pom

Currently when you start an OSGi project from scratch it is quite 
tedious to create a working deployment for a basic OSGi framework with 
some typical dependencies.

What I found that most people use is this:
- framework
- event admin
- config admin
- meta type
- fileinstall
- gogo
- scr
- http

Simply providing the actual bundles would be too inflexible. I think it 
would make sense to provide a repository though that can
be used to resolve the actual dependencies you want to include.

Bndtools recently started to support maven. With version 3.2.0 it is now 
possible to create an index from a pom and use it for you project.
I am currently experimenting with this to provide an easy way to create 
applications.

You can find an example pom for an index here:
https://github.com/cschneider/osgi-chat/blob/master/packaging/index/pom.xml#L15-L102

The marked dependencies are the ones I needed for the typical felix 
bundles. So what I propose is to create a project in felix that links 
the dependencies of those projects
in their current version and that is released from time to time to 
reflect the newest working set. This would make it much easier to start 
as you could just start with the
recommended felix set. The user can then use them by just adding one 
dependency but also easily override individual parts if he needs 
something in a newer version.

This can then be used to create a bndrun file with requirements that are 
resolved against the user repository.
See 
https://github.com/cschneider/osgi-chat/blob/master/packaging/all/chat-all.bndrun

As you can see some Apache projects like Aries RSA and CXF-DOSGi already 
provide such dependency poms which makes them really easy to use:
https://github.com/cschneider/osgi-chat/blob/master/packaging/index/pom.xml#L111-L122

Of course for these projects it is easier as their bundles are simply 
released together but I think it would also make sense for felix to 
reflect the currently recommended
combination of the typical bundles.

So what do you think?

Christian

Btw. Peter Kriens is currently working on a bndtools repository that 
does not even need an OBR index and instead can directly use such poms.

-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: [Discuss] Providing typical felix dependencies as a pom

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
That's also my point: as Felix provides atomic projects, it's so useful 
for Felix itself. That's why it makes more sense in Karaf as it already 
"packages" different Felix projects all together.

My $0.01.

Regards
JB

On 07/14/2016 03:40 PM, Carsten Ziegeler wrote:
> Maybe we should ask who would really actually use this?
>
> I'm not saying it is not useful, but still I would like to know if there
> is some existing interest
>
> Regards
> Carsten
>
>> Yes. That is the reason why I propose to adapt and release the bom about
>> every 6 months to catch up with the changes.
>> Of course we can choose any time interval.
>>
>> I would volunteer to provide the initial pom and also do the regular
>> updates if no one else does it.
>>
>> Christian
>>
>> On 14.07.2016 14:58, Jean-Baptiste Onofr� wrote:
>>>
>>> I'm still puzzled where to define such BoM.
>>> In Karaf, we already do the validation of the versions all together
>>> (that's one of the Karaf purpose). So, it's the most straight forward
>>> way.
>>> In Felix, as we provide each dependency individually, we have to
>>> remember to update and provide the BoM.
>>>
>>> Regards
>>> JB
>>>
>>>
>>
>>
>
>
>
>

-- 
Jean-Baptiste Onofr�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [Discuss] Providing typical felix dependencies as a pom

Posted by Carsten Ziegeler <cz...@apache.org>.
Maybe we should ask who would really actually use this?

I'm not saying it is not useful, but still I would like to know if there
is some existing interest

Regards
Carsten

> Yes. That is the reason why I propose to adapt and release the bom about
> every 6 months to catch up with the changes.
> Of course we can choose any time interval.
> 
> I would volunteer to provide the initial pom and also do the regular
> updates if no one else does it.
> 
> Christian
> 
> On 14.07.2016 14:58, Jean-Baptiste Onofr� wrote:
>>
>> I'm still puzzled where to define such BoM.
>> In Karaf, we already do the validation of the versions all together
>> (that's one of the Karaf purpose). So, it's the most straight forward
>> way.
>> In Felix, as we provide each dependency individually, we have to
>> remember to update and provide the BoM.
>>
>> Regards
>> JB
>>
>>
> 
> 


 

-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org


Re: [Discuss] Providing typical felix dependencies as a pom

Posted by Christian Schneider <ch...@die-schneider.net>.
Yes. That is the reason why I propose to adapt and release the bom about 
every 6 months to catch up with the changes.
Of course we can choose any time interval.

I would volunteer to provide the initial pom and also do the regular 
updates if no one else does it.

Christian

On 14.07.2016 14:58, Jean-Baptiste Onofr� wrote:
>
> I'm still puzzled where to define such BoM.
> In Karaf, we already do the validation of the versions all together 
> (that's one of the Karaf purpose). So, it's the most straight forward 
> way.
> In Felix, as we provide each dependency individually, we have to 
> remember to update and provide the BoM.
>
> Regards
> JB
>
>


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: [Discuss] Providing typical felix dependencies as a pom

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
"most for us", that's the point ;)

I'm still puzzled where to define such BoM.
In Karaf, we already do the validation of the versions all together 
(that's one of the Karaf purpose). So, it's the most straight forward way.
In Felix, as we provide each dependency individually, we have to 
remember to update and provide the BoM.

Regards
JB

On 07/14/2016 02:55 PM, Christian Schneider wrote:
> I think we will not be able to globally align dependencies for all
> projects but the resolver should figure out most for us.
> For the worst cases people can use excludes and overrides when the
> depend on the boms.
>
> Christian
>
> On 14.07.2016 14:51, Jean-Baptiste Onofr� wrote:
>> On the other hand, the same issue can happen to maintain dependencies
>> aligned in different BoMs.
>>
>

-- 
Jean-Baptiste Onofr�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [Discuss] Providing typical felix dependencies as a pom

Posted by Christian Schneider <ch...@die-schneider.net>.
I think we will not be able to globally align dependencies for all 
projects but the resolver should figure out most for us.
For the worst cases people can use excludes and overrides when the 
depend on the boms.

Christian

On 14.07.2016 14:51, Jean-Baptiste Onofr� wrote:
> On the other hand, the same issue can happen to maintain dependencies 
> aligned in different BoMs.
>

-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: [Discuss] Providing typical felix dependencies as a pom

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
On the other hand, the same issue can happen to maintain dependencies 
aligned in different BoMs.

On 07/14/2016 02:49 PM, Christian Schneider wrote:
> We can provide boms for projects in karaf but it then means that the
> karaf team must monitor all upstream projects for changes and adapt the
> boms.
> I think it makes more sense to let each project do this during their
> releases.
>
> It is like with features currently we still provide e.g. the hibernate
> feature in karaf but they are now providing a feature directly which
> means the feature is always updated with new releases.
> I think it is the same with these boms.
>
> Actually I hope at some point the bom poms can be used to facilitate the
> feature creation as they typically should provide the same bundles that
> are also needed to create features.
>
> Christian
>
> On 14.07.2016 13:55, Jean-Baptiste Onofr� wrote:
>> Ok, it makes sense.
>>
>> As we already have kind of assembly of these Felix dependencies in
>> Karaf, why not providing this BoM in Karaf, with version aligned to
>> the Karaf release, and dependencies defined.
>>
>> WDYT ?
>>
>> Regards
>> JB
>

-- 
Jean-Baptiste Onofr�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [Discuss] Providing typical felix dependencies as a pom

Posted by Christian Schneider <ch...@die-schneider.net>.
We can provide boms for projects in karaf but it then means that the 
karaf team must monitor all upstream projects for changes and adapt the 
boms.
I think it makes more sense to let each project do this during their 
releases.

It is like with features currently we still provide e.g. the hibernate 
feature in karaf but they are now providing a feature directly which 
means the feature is always updated with new releases.
I think it is the same with these boms.

Actually I hope at some point the bom poms can be used to facilitate the 
feature creation as they typically should provide the same bundles that 
are also needed to create features.

Christian

On 14.07.2016 13:55, Jean-Baptiste Onofr� wrote:
> Ok, it makes sense.
>
> As we already have kind of assembly of these Felix dependencies in 
> Karaf, why not providing this BoM in Karaf, with version aligned to 
> the Karaf release, and dependencies defined.
>
> WDYT ?
>
> Regards
> JB

-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: [Discuss] Providing typical felix dependencies as a pom

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Ok, it makes sense.

As we already have kind of assembly of these Felix dependencies in 
Karaf, why not providing this BoM in Karaf, with version aligned to the 
Karaf release, and dependencies defined.

WDYT ?

Regards
JB

On 07/14/2016 10:50 AM, Christian Schneider wrote:
> Yes. I propose to create a module in felix for this purpose. A "bom" pom
> to be
> used by end users to easily create indexes. The pom would already have
> all excludes and whatever is necessary to
> produce a good list of bundles.
>
> We could release this bom like every 6 months to bring all modules to
> their recommneded version at the time of the release.
>
> Christian
>
> On 14.07.2016 07:38, Jean-Baptiste Onofr� wrote:
>> So basically, what you are proposing is a BoM (Bill of Material).
>>
>> I'm not against, but I don't think it's a Felix concern, or we would
>> need to create a specific module in Felix for that.
>>
>> My $0.01
>>
>> Regards
>> JB
>

-- 
Jean-Baptiste Onofr�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [Discuss] Providing typical felix dependencies as a pom

Posted by Christian Schneider <ch...@die-schneider.net>.
Yes. I propose to create a module in felix for this purpose. A "bom" pom 
to be
used by end users to easily create indexes. The pom would already have 
all excludes and whatever is necessary to
produce a good list of bundles.

We could release this bom like every 6 months to bring all modules to 
their recommneded version at the time of the release.

Christian

On 14.07.2016 07:38, Jean-Baptiste Onofr� wrote:
> So basically, what you are proposing is a BoM (Bill of Material).
>
> I'm not against, but I don't think it's a Felix concern, or we would 
> need to create a specific module in Felix for that.
>
> My $0.01
>
> Regards
> JB

-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: [Discuss] Providing typical felix dependencies as a pom

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
So basically, what you are proposing is a BoM (Bill of Material).

I'm not against, but I don't think it's a Felix concern, or we would 
need to create a specific module in Felix for that.

My $0.01

Regards
JB

On 07/13/2016 12:01 PM, Christian Schneider wrote:
> Currently when you start an OSGi project from scratch it is quite
> tedious to create a working deployment for a basic OSGi framework with
> some typical dependencies.
>
> What I found that most people use is this:
> - framework
> - event admin
> - config admin
> - meta type
> - fileinstall
> - gogo
> - scr
> - http
>
> Simply providing the actual bundles would be too inflexible. I think it
> would make sense to provide a repository though that can
> be used to resolve the actual dependencies you want to include.
>
> Bndtools recently started to support maven. With version 3.2.0 it is now
> possible to create an index from a pom and use it for you project.
> I am currently experimenting with this to provide an easy way to create
> applications.
>
> You can find an example pom for an index here:
> https://github.com/cschneider/osgi-chat/blob/master/packaging/index/pom.xml#L15-L102
>
>
> The marked dependencies are the ones I needed for the typical felix
> bundles. So what I propose is to create a project in felix that links
> the dependencies of those projects
> in their current version and that is released from time to time to
> reflect the newest working set. This would make it much easier to start
> as you could just start with the
> recommended felix set. The user can then use them by just adding one
> dependency but also easily override individual parts if he needs
> something in a newer version.
>
> This can then be used to create a bndrun file with requirements that are
> resolved against the user repository.
> See
> https://github.com/cschneider/osgi-chat/blob/master/packaging/all/chat-all.bndrun
>
>
> As you can see some Apache projects like Aries RSA and CXF-DOSGi already
> provide such dependency poms which makes them really easy to use:
> https://github.com/cschneider/osgi-chat/blob/master/packaging/index/pom.xml#L111-L122
>
>
> Of course for these projects it is easier as their bundles are simply
> released together but I think it would also make sense for felix to
> reflect the currently recommended
> combination of the typical bundles.
>
> So what do you think?
>
> Christian
>
> Btw. Peter Kriens is currently working on a bndtools repository that
> does not even need an OBR index and instead can directly use such poms.
>

-- 
Jean-Baptiste Onofr�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com