You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by "Simon Kitching (JIRA)" <ji...@apache.org> on 2015/04/02 08:34:53 UTC

[jira] [Commented] (CURATOR-201) Update to latest maven-bundle-plugin : fixes OSGi "uses" constraints

    [ https://issues.apache.org/jira/browse/CURATOR-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14392228#comment-14392228 ] 

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:
{code}
-        <maven-bundle-plugin-version>2.3.7</maven-bundle-plugin-version>
+        <maven-bundle-plugin-version>2.5.3</maven-bundle-plugin-version>
{code}

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 "com.google" 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: https://issues.apache.org/jira/browse/CURATOR-201
>             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
(v6.3.4#6332)