[
https://issues.apache.org/jira/browse/FELIX-494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stuart McCulloch updated FELIX-494:
-----------------------------------
Attachment: pom.xml
Sample pom.xml which removes the split package warning (also adds execution
section for FELIX-495)
Here's the reason why the split package warning appeared:
The split package detection logic in BND basically checks to see if a
directory has already been added
to the bundle, and outputs a warning if it has. Unfortunately this logic can
occasionally produce a false
positive when a private class is located in a package *above* exported
classes.
For example:
Export-Package: alpha.bravo.charlie
Private-Package: alpha.bravo
Bundle-Activator: alpha.bravo.Activator
which is similar to the situation in the basedriver.
The simplest solution is to add the ";-split-package:=merge-first" attribute to
the affected packages, which
tells BND to not produce the warning and merge the contents of the packages
using a "first-win" approach
to resolve overlapping classes.
Another solution would be to refactor the Activator to a package alongside or
below the exported packages:
Export-Package: alpha.bravo.charlie
Private-Package: alpha.bravo.internal
Bundle-Activator: alpha.bravo.internal.Activator
which imho makes things a bit clearer, but it's just a personal preference.
FYI, I also tweaked the other instructions to use wildcards where possible,
which you may or may not want.
> basedriver bundle require split-package
> ---------------------------------------
>
> Key: FELIX-494
> URL: https://issues.apache.org/jira/browse/FELIX-494
> Project: Felix
> Issue Type: Bug
> Components: UPnP Subproject
> Reporter: Stefano Lenzi
> Assignee: Stefano Lenzi
> Priority: Minor
> Attachments: pom.xml
>
>
> Unable to configure POM for basedriver in order to avoid the spli-package
> warning
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.