curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Kitching (JIRA)" <>
Subject [jira] [Commented] (CURATOR-201) Update to latest maven-bundle-plugin : fixes OSGi "uses" constraints
Date Thu, 02 Apr 2015 06:34:53 GMT


Simon Kitching commented on CURATOR-201:

In the OSGi-specific "Export-Package" entry in the manifest, each exported package can have
zero or more packages in a "uses" constraint. The constraint then requires any bundle importing
that package to bind to the same version of the "used" package as the exporter.

The intention is that "uses" lists external types required to invoke the _public api_ of the
classes in the exported package. However plugin version 2.3.7 lists _all_ external types referenced
by the exported package, including those only used 'internally' (eg as private class members,
or local variables in methods).

Change required in curator/pom.xml:
-        <maven-bundle-plugin-version>2.3.7</maven-bundle-plugin-version>
+        <maven-bundle-plugin-version>2.5.3</maven-bundle-plugin-version>

Result is that the META-INF/MANIFEST.MF for curator-client etc have far fewer "uses" entries.
As example, after this change the generated curator-client.jar MANIFEST.MF file no longer
contains any reference to "" in the Export-Package entry.

This change should be binary-compatible; it changes no code and only _reduces_ the set of
constraints (AFAIK).

> Update to latest maven-bundle-plugin : fixes OSGi "uses" constraints
> --------------------------------------------------------------------
>                 Key: CURATOR-201
>                 URL:
>             Project: Apache Curator
>          Issue Type: Improvement
>          Components: General
>            Reporter: Simon Kitching
>   Original Estimate: 10m
>  Remaining Estimate: 10m
> The curator main pom currently specifies version 2.3.7 for plugin maven-bundle-plugin.
This plugin is responsible for generating the OSGi-specific parts of the MANIFEST.MF file.
Unfortunately that version of maven-bundle-plugin is buggy and generates too many "uses" constraints
into the MANIFEST.MF. The latest version of maven-bundle-plugin (2.5.3) fixes this.

This message was sent by Atlassian JIRA

View raw message