You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Steinar Bang <sb...@dod.no> on 2021/05/30 13:58:09 UTC

Nice if OSGi and OSGi compendium versions were part of the karaf BoM

I need the osgi framework and the OSGi LogService defintion and the SCR
annotations for all project (and now: the OSGi 7 web whiteboard
annotations) for all of my karaf web app projects.

It would be nice if I could pick the versions for all of those from the
karaf BoM (where I eg. get pax-web version currently).

Since they aren't there already, I'm guessing it's because the karaf BoM
may not be the right place for them...?

But since I always need them it would be nice to have them provided.


Re: Nice if OSGi and OSGi compendium versions were part of the karaf BoM

Posted by JB Onofré <jb...@nanthrax.net>.
By the way I will create the corresponding Jira tonight or tomorrow. 

Regards 
JB

> Le 30 mai 2021 à 17:55, Steinar Bang <sb...@dod.no> a écrit :
> 
> 
>> 
>>>>>> JB Onofré <jb...@nanthrax.net>:
> 
>> Good point and I agree. 
>> Does it work for you if I add this to karaf 4.3.3 and 4.2.12 ?
> 
> That would be excellent! Thanks! :-)
> 
>> Thanks for the proposal. 
> 
> My pleasure! :-)
> 


Re: Nice if OSGi and OSGi compendium versions were part of the karaf BoM

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Who cares about JPMS ? ;) It’s deprecated right ? ;)

> Le 31 mai 2021 à 17:22, Robert Varga <ni...@hq.sk> a écrit :
> 
> On 31/05/2021 16:50, Jean-Baptiste Onofre wrote:
>> These dependencies are not necessary as they come with cmpn.
> 
> True, but you need the split out artifacts to make JPMS work reasonably:
> 
> https://github.com/opendaylight/yangtools/blob/master/xpath/yang-xpath-impl/src/main/java/module-info.java#L26
> https://github.com/opendaylight/yangtools/blob/master/xpath/yang-xpath-impl/pom.xml#L60-L63
> 
> I do not remember the details anymore, but this setup ended up being the
> most reasonable thing to do.
> 
> I also have no idea how R8 changes the interop picture here -- osgi.core
> has an Automatic-Module-Name manifest entry  (finally!), not sure how
> others will look like.
> 
> Regards,
> Robert
> 
> 
>> 
>> Regards
>> JB
>> 
>>> Le 31 mai 2021 à 15:08, Steinar Bang <sb...@dod.no> a écrit :
>>> 
>>>>>>>> Jean-Baptiste Onofre <jb...@nanthrax.net>:
>>> 
>>>> Hi Steinar,
>>>> I just checked and both osgi.core and osgi.cmpn are part of the Karaf BoM (as I thought ;) ):
>>> 
>>>> https://github.com/apache/karaf/blob/main/bom/pom.xml#L39 <https://github.com/apache/karaf/blob/main/bom/pom.xml#L39>
>>> 
>>> Hm... that one should be correct.  But the artifactId changed here
>>> between OSGi 6 and 7 and I started using the BoM in karaf 4.2.11 and
>>> just filled up with versions for those dependencies that couldn't find
>>> their so I may have been confused here.
>>> 
>>> But this should work for me, so I'll correct this in my projects.  Thanks!
>>> 
>>>> https://github.com/apache/karaf/blob/main/bom/pom.xml#L525 <https://github.com/apache/karaf/blob/main/bom/pom.xml#L525>
>>> 
>>> I'm thinking of stuff that is part of the compendium, e.g. (for OSGi 7)
>>> The log service:
>>>   <dependency>
>>>     <groupId>org.osgi</groupId>
>>>     <artifactId>org.osgi.service.log</artifactId>
>>>     <version>1.4.0</version>
>>>     <scope>provided</scope>
>>>   </dependency>
>>> 
>>> the SCR annotations:
>>>   <dependency>
>>>     <groupId>org.osgi</groupId>
>>>     <artifactId>org.osgi.service.component.annotations</artifactId>
>>>     <version>1.4.0</version>
>>>     <scope>provided</scope>
>>>   </dependency>
>>> 
>>> the OSGi 7 web whiteboard annotations:
>>>   <dependency>
>>>     <groupId>org.osgi</groupId>
>>>     <artifactId>org.osgi.service.http.whiteboard</artifactId>
>>>     <version>1.1.0</version>
>>>     <scope>provided</scope>
>>>   </dependency>
>>> 
>>> (these are the ones I use, but there is probably a lot of others for
>>> stuff I don't know about. Also, I'm not sure of the OSGi 7 web
>>> whiteboard maven dependency?  I found that one by digging around on
>>> maven central and it seems to have the correct contents and a publishing
>>> date matching the rest of the OSGi 7 stuff...?)
>>> 
>> 
> 


Re: Nice if OSGi and OSGi compendium versions were part of the karaf BoM

Posted by Robert Varga <ni...@hq.sk>.
On 31/05/2021 16:50, Jean-Baptiste Onofre wrote:
> These dependencies are not necessary as they come with cmpn.

True, but you need the split out artifacts to make JPMS work reasonably:

https://github.com/opendaylight/yangtools/blob/master/xpath/yang-xpath-impl/src/main/java/module-info.java#L26
https://github.com/opendaylight/yangtools/blob/master/xpath/yang-xpath-impl/pom.xml#L60-L63

I do not remember the details anymore, but this setup ended up being the
most reasonable thing to do.

I also have no idea how R8 changes the interop picture here -- osgi.core
has an Automatic-Module-Name manifest entry  (finally!), not sure how
others will look like.

Regards,
Robert


> 
> Regards
> JB
> 
>> Le 31 mai 2021 à 15:08, Steinar Bang <sb...@dod.no> a écrit :
>>
>>>>>>> Jean-Baptiste Onofre <jb...@nanthrax.net>:
>>
>>> Hi Steinar,
>>> I just checked and both osgi.core and osgi.cmpn are part of the Karaf BoM (as I thought ;) ):
>>
>>> https://github.com/apache/karaf/blob/main/bom/pom.xml#L39 <https://github.com/apache/karaf/blob/main/bom/pom.xml#L39>
>>
>> Hm... that one should be correct.  But the artifactId changed here
>> between OSGi 6 and 7 and I started using the BoM in karaf 4.2.11 and
>> just filled up with versions for those dependencies that couldn't find
>> their so I may have been confused here.
>>
>> But this should work for me, so I'll correct this in my projects.  Thanks!
>>
>>> https://github.com/apache/karaf/blob/main/bom/pom.xml#L525 <https://github.com/apache/karaf/blob/main/bom/pom.xml#L525>
>>
>> I'm thinking of stuff that is part of the compendium, e.g. (for OSGi 7)
>> The log service:
>>    <dependency>
>>      <groupId>org.osgi</groupId>
>>      <artifactId>org.osgi.service.log</artifactId>
>>      <version>1.4.0</version>
>>      <scope>provided</scope>
>>    </dependency>
>>
>> the SCR annotations:
>>    <dependency>
>>      <groupId>org.osgi</groupId>
>>      <artifactId>org.osgi.service.component.annotations</artifactId>
>>      <version>1.4.0</version>
>>      <scope>provided</scope>
>>    </dependency>
>>
>> the OSGi 7 web whiteboard annotations:
>>    <dependency>
>>      <groupId>org.osgi</groupId>
>>      <artifactId>org.osgi.service.http.whiteboard</artifactId>
>>      <version>1.1.0</version>
>>      <scope>provided</scope>
>>    </dependency>
>>
>> (these are the ones I use, but there is probably a lot of others for
>> stuff I don't know about. Also, I'm not sure of the OSGi 7 web
>> whiteboard maven dependency?  I found that one by digging around on
>> maven central and it seems to have the correct contents and a publishing
>> date matching the rest of the OSGi 7 stuff...?)
>>
> 


Re: Nice if OSGi and OSGi compendium versions were part of the karaf BoM

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
These dependencies are not necessary as they come with cmpn.

Regards
JB

> Le 31 mai 2021 à 15:08, Steinar Bang <sb...@dod.no> a écrit :
> 
>>>>>> Jean-Baptiste Onofre <jb...@nanthrax.net>:
> 
>> Hi Steinar,
>> I just checked and both osgi.core and osgi.cmpn are part of the Karaf BoM (as I thought ;) ):
> 
>> https://github.com/apache/karaf/blob/main/bom/pom.xml#L39 <https://github.com/apache/karaf/blob/main/bom/pom.xml#L39>
> 
> Hm... that one should be correct.  But the artifactId changed here
> between OSGi 6 and 7 and I started using the BoM in karaf 4.2.11 and
> just filled up with versions for those dependencies that couldn't find
> their so I may have been confused here.
> 
> But this should work for me, so I'll correct this in my projects.  Thanks!
> 
>> https://github.com/apache/karaf/blob/main/bom/pom.xml#L525 <https://github.com/apache/karaf/blob/main/bom/pom.xml#L525>
> 
> I'm thinking of stuff that is part of the compendium, e.g. (for OSGi 7)
> The log service:
>    <dependency>
>      <groupId>org.osgi</groupId>
>      <artifactId>org.osgi.service.log</artifactId>
>      <version>1.4.0</version>
>      <scope>provided</scope>
>    </dependency>
> 
> the SCR annotations:
>    <dependency>
>      <groupId>org.osgi</groupId>
>      <artifactId>org.osgi.service.component.annotations</artifactId>
>      <version>1.4.0</version>
>      <scope>provided</scope>
>    </dependency>
> 
> the OSGi 7 web whiteboard annotations:
>    <dependency>
>      <groupId>org.osgi</groupId>
>      <artifactId>org.osgi.service.http.whiteboard</artifactId>
>      <version>1.1.0</version>
>      <scope>provided</scope>
>    </dependency>
> 
> (these are the ones I use, but there is probably a lot of others for
> stuff I don't know about. Also, I'm not sure of the OSGi 7 web
> whiteboard maven dependency?  I found that one by digging around on
> maven central and it seems to have the correct contents and a publishing
> date matching the rest of the OSGi 7 stuff...?)
> 


Re: Nice if OSGi and OSGi compendium versions were part of the karaf BoM

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
I’m not sure about pax-jdbc, as it’s more a third party (I don’t want to introduce kind of infinite loop ;) ).

Let me think about that ;)

Regards
JB

> Le 31 mai 2021 à 16:28, Steinar Bang <sb...@dod.no> a écrit :
> 
> But pax-jdbc isn't in https://github.com/apache/karaf/blob/main/bom/pom.xml
> 
> Should it be?
> 


Re: Nice if OSGi and OSGi compendium versions were part of the karaf BoM

Posted by Steinar Bang <sb...@dod.no>.
But pax-jdbc isn't in https://github.com/apache/karaf/blob/main/bom/pom.xml

Should it be?


Re: Nice if OSGi and OSGi compendium versions were part of the karaf BoM

Posted by Steinar Bang <sb...@dod.no>.
>>>>> Steinar Bang <sb...@dod.no>:

>> https://github.com/apache/karaf/blob/main/bom/pom.xml#L525 <https://github.com/apache/karaf/blob/main/bom/pom.xml#L525>

Ok. This works for all of the annotations, and the LogService.
No need for me to reference these directly.

Ok... there I learnt something new! :-)

I will correct my dependencies.


Re: Nice if OSGi and OSGi compendium versions were part of the karaf BoM

Posted by Steinar Bang <sb...@dod.no>.
>>>>> Jean-Baptiste Onofre <jb...@nanthrax.net>:

> Hi Steinar,
> I just checked and both osgi.core and osgi.cmpn are part of the Karaf BoM (as I thought ;) ):

> https://github.com/apache/karaf/blob/main/bom/pom.xml#L39 <https://github.com/apache/karaf/blob/main/bom/pom.xml#L39>

Hm... that one should be correct.  But the artifactId changed here
between OSGi 6 and 7 and I started using the BoM in karaf 4.2.11 and
just filled up with versions for those dependencies that couldn't find
their so I may have been confused here.

But this should work for me, so I'll correct this in my projects.  Thanks!

> https://github.com/apache/karaf/blob/main/bom/pom.xml#L525 <https://github.com/apache/karaf/blob/main/bom/pom.xml#L525>

I'm thinking of stuff that is part of the compendium, e.g. (for OSGi 7)
The log service:
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.service.log</artifactId>
      <version>1.4.0</version>
      <scope>provided</scope>
    </dependency>

the SCR annotations:
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.service.component.annotations</artifactId>
      <version>1.4.0</version>
      <scope>provided</scope>
    </dependency>

the OSGi 7 web whiteboard annotations:
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.service.http.whiteboard</artifactId>
      <version>1.1.0</version>
      <scope>provided</scope>
    </dependency>

(these are the ones I use, but there is probably a lot of others for
stuff I don't know about. Also, I'm not sure of the OSGi 7 web
whiteboard maven dependency?  I found that one by digging around on
maven central and it seems to have the correct contents and a publishing
date matching the rest of the OSGi 7 stuff...?)


Re: Nice if OSGi and OSGi compendium versions were part of the karaf BoM

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi Steinar,

I just checked and both osgi.core and osgi.cmpn are part of the Karaf BoM (as I thought ;) ):

https://github.com/apache/karaf/blob/main/bom/pom.xml#L39 <https://github.com/apache/karaf/blob/main/bom/pom.xml#L39>

https://github.com/apache/karaf/blob/main/bom/pom.xml#L525 <https://github.com/apache/karaf/blob/main/bom/pom.xml#L525>

Maybe you don’t use the correct Maven coordinates in your project.

Regards
JB

> Le 30 mai 2021 à 17:55, Steinar Bang <sb...@dod.no> a écrit :
> 
>>>>>> JB Onofré <jb...@nanthrax.net>:
> 
>> Good point and I agree. 
>> Does it work for you if I add this to karaf 4.3.3 and 4.2.12 ?
> 
> That would be excellent! Thanks! :-)
> 
>> Thanks for the proposal. 
> 
> My pleasure! :-)
> 


Re: Nice if OSGi and OSGi compendium versions were part of the karaf BoM

Posted by Steinar Bang <sb...@dod.no>.
>>>>> JB Onofré <jb...@nanthrax.net>:

> Good point and I agree. 
> Does it work for you if I add this to karaf 4.3.3 and 4.2.12 ?

That would be excellent! Thanks! :-)

> Thanks for the proposal. 

My pleasure! :-)


Re: Nice if OSGi and OSGi compendium versions were part of the karaf BoM

Posted by JB Onofré <jb...@nanthrax.net>.
Good point and I agree. 

Does it work for you if I add this to karaf 4.3.3 and 4.2.12 ?

Thanks for the proposal. 

Regards 
JB

> Le 30 mai 2021 à 15:58, Steinar Bang <sb...@dod.no> a écrit :
> 
> I need the osgi framework and the OSGi LogService defintion and the SCR
> annotations for all project (and now: the OSGi 7 web whiteboard
> annotations) for all of my karaf web app projects.
> 
> It would be nice if I could pick the versions for all of those from the
> karaf BoM (where I eg. get pax-web version currently).
> 
> Since they aren't there already, I'm guessing it's because the karaf BoM
> may not be the right place for them...?
> 
> But since I always need them it would be nice to have them provided.
>