Update version of OSGIfied dependency

Hi,

I’ve created an issue #10496 and want to resolve it, but I never worked with OSGI before.
What is the way to update version of OSGIfied dependency?
The current version of Jinjava library is 2.5.0, but I need 2.5.7 to resolve the issue.

Hi there,

I think a good start would be to check the openhab/openhab-osgiify repository on GitHub. That is the place where we add OSGI-ified dependencies of the openHAB project.

1 Like

Thanks for the response.
I checked this repository, but cannot see any version updates in the history. Maybe they were in old repository.
Looks like openhab-osgiify doesn’t has a CI for now and bundles are uploading manually.
So, will the 2.5.0 version be removed after changing version to 2.5.7?
If not, then correct flow should be like:

  1. PR to change Jingava version to 2.5.7. The old 2.5.0 version should not be removed.
  2. Implement transformation change and test it locally.
  3. PR with new transformation version.

I have to admit that I cannot remember a version change for OSGI-ified dependencies until today. And I am not aware of an official guide how to do it. Your proposed steps sound good. Let’s go for it.

In many cases where only one thing is missing is an manifest or a single line of it, you can solve problem through wrap protocol.

Use in feature file:

<feature name=x>
  <feature prerequisite=true>wrap</feature>
  <bundle>wrap:mvn:jinja/jinja/2.x.x</bundle>
  <bundle>mvn:org.openhab…</bundle>
</feature>

Wrap protocol does generation of manifest on the fly using defaults. If its not working as expected you can add instructions to wrap URL. After version (2.x.x) you can place ie. $Import-Package=*&amp;override=merge. This override merge element allows to metge existing manifest with new instructions you placed in URI.

Best,
Łukasz

1 Like