commons-dev mailing list archives

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

On Wed, Jun 7, 2017 at 2:10 AM, Jörg Schaible <joerg.schaible@gmx.de> wrote:
> ...maybe you have missed the discussion for
> https://issues.apache.org/jira/browse/COMPRESS-399, 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 https://github.com/apache/commons-compress/pull/26 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 http://www.aqute.biz/Bnd/Bnd
[INFO] Comparing bundle org.apache.sling.distribution.api version
0.3.1-SNAPSHOT to version 0.3.0
[INFO]
[INFO]   PACKAGE_NAME                                       DELTA
CUR_VER    BASE_VER   REC_VER    WARNINGS
[INFO] = ================================================== ==========
========== ========== ========== ==========
[INFO] * org.apache.sling.distribution                      minor
0.3.0      0.3.0      0.4.0      Version increase required
[INFO]      < interface org.apache.sling.distribution.Distributor
[INFO]          + method doNothing()
[INFO]              + access abstract
[INFO] -----------------------------------------------------------------------------------------------------------
[INFO]   org.apache.sling.distribution.event                unchanged
0.1.1      0.1.1      0.1.1      -
[INFO] -----------------------------------------------------------------------------------------------------------
[INFO]   org.apache.sling.distribution.transport            unchanged
0.1.0      0.1.0      0.1.0      -
[INFO] -----------------------------------------------------------------------------------------------------------
[ERROR] org.apache.sling.distribution: Version increase required;
detected 0.3.0, suggested 0.4.0
[INFO] Baseline analysis complete, 1 error(s), 0 warning(s)

HTH,
-Bertrand

[1] https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/distribution/api

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message