commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <>
Subject Re: OSGi Version at Package Level
Date Wed, 07 Jun 2017 06:56:01 GMT

On Wed, Jun 7, 2017 at 2:10 AM, Jörg Schaible <> wrote:
> ...maybe you have missed the discussion for
>, but in short we face a
> PR that introduces individual versions at package level for a component....

That's standard practice for OSGi bundles.

The changes look
suboptimal because they set the same initial version for each exported
package, but that's correct as a way to start doing that.

The "baseline" goal of the Apache Felix maven-bundle-plugin can then
be used to automatically recommend changes to those version numbers to
implement semantic versioning *at the java package level* which is the
way OSGi handles this.

We're using this extensively in Apache Sling, where we release a large
number of bundles each with their own package-level version numbers
which evolve independently from the bundle version. It works well once
it's setup, which is what that pull/26 does AFAICS.

Here's example output from that plugin building [1] after adding a
method to a class in the o.a.s.distribution package:

[INFO] Baseline Report - Generated by Apache Felix Maven Bundle Plugin
on 2017-06-07T08:54Z based on Bnd - see
[INFO] Comparing bundle version
0.3.1-SNAPSHOT to version 0.3.0
[INFO]   PACKAGE_NAME                                       DELTA
[INFO] = ================================================== ==========
========== ========== ========== ==========
[INFO] *                      minor
0.3.0      0.3.0      0.4.0      Version increase required
[INFO]      < interface
[INFO]          + method doNothing()
[INFO]              + access abstract
[INFO] -----------------------------------------------------------------------------------------------------------
[INFO]                unchanged
0.1.1      0.1.1      0.1.1      -
[INFO] -----------------------------------------------------------------------------------------------------------
[INFO]            unchanged
0.1.0      0.1.0      0.1.0      -
[INFO] -----------------------------------------------------------------------------------------------------------
[ERROR] Version increase required;
detected 0.3.0, suggested 0.4.0
[INFO] Baseline analysis complete, 1 error(s), 0 warning(s)



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message