felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Kriens (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (FELIX-907) Regression in latest BND code: negated exports are applied to private packages
Date Mon, 02 Feb 2009 10:06:00 GMT

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

Peter Kriens resolved FELIX-907.
--------------------------------

    Resolution: Fixed

I have fixed this in bnd-310. I have not used the given patch because it did not solve the
problem in all cases (as you said). I now do them separately and then add the results. The
tricky part was not to mess with the split package detecting logic.

> 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.


Mime
View raw message