felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stuart McCulloch (JIRA)" <j...@apache.org>
Subject [jira] Updated: (FELIX-907) Regression in latest BND code: negated exports are applied to private packages
Date Thu, 29 Jan 2009 11:17:59 GMT

     [ https://issues.apache.org/jira/browse/FELIX-907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Stuart McCulloch updated FELIX-907:

    Attachment: FELIX-907-20090129.patch

Proposed patch (this might not fix the problem completely)

> Regression in latest BND code: negated exports are applied to private packages
> ------------------------------------------------------------------------------
>                 Key: FELIX-907
>                 URL: https://issues.apache.org/jira/browse/FELIX-907
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Stuart McCulloch
>            Assignee: Peter Kriens
>             Fix For: maven-bundle-plugin-1.6.0
>         Attachments: FELIX-907-20090129.patch
> The latest version of the Bnd Tool has a bug where it combines the Export-Package instructions
with the Private-Package instructions:
>         all.putAll(replaceWitInstruction(getHeader(EXPORT_PACKAGE),
>                 EXPORT_PACKAGE));
>         all.putAll(replaceWitInstruction(getHeader(PRIVATE_PACKAGE),
>                 PRIVATE_PACKAGE));
> this ordering means that any negated packages in Export-Package are erroneously applied
to the list of packages in Private-Package.
> For example, when you have instructions like the following:
>   <Export-Package>!org.foo.internal.*,org.foo.*</Export-Package>
>   <Private-Package>org.foo.internal.*</Private-Package>
> the Bnd Tool will end up excluding the internal packages from the final bundle.
> Reversing the statements to be:
>         all.putAll(replaceWitInstruction(getHeader(PRIVATE_PACKAGE),
>                 PRIVATE_PACKAGE));
>         all.putAll(replaceWitInstruction(getHeader(EXPORT_PACKAGE),
>                 EXPORT_PACKAGE));
> appears to fix the problem, although you could then have problems with negated packages
in the Private-Package affecting the Export-Package - but this is less likely.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message