The best way to deal with split packages is to hot have split packages. It's 
worth spending some effort to refactor if at all possible.  

Chris' approach is the second best, and is not Equinox-specific. Ie it should 
work on any framework. 

Neil 

-- 
Neil Bartlett
Sent from a phone


On Tuesday, 22 January 2013 at 14:39, [email protected] wrote:

> Cancel
> 
> Sent from Yahoo! Mail for iPhone
> 
> From: David Bosschaert <[email protected]>; 
> To: OSGi Developer Mail List <[email protected]>; 
> Subject: [osgi-dev] What's the best way to deal with split packages? 
> Sent: Tue, Jan 22, 2013 10:48:37 AM 
> 
> Hi all,
> 
> I'm trying to understand what the best way is to deal with split packages in 
> an OSGi environment, assuming that it's not an option to bluntly rename those 
> packages. 
> 
> I found this fairly old post from Chris A. that seems to give a possible way 
> of working with these:
> http://eclipsesource.com/blogs/2008/08/22/tip-split-packages-and-visibility/
> 
> Effectively the post boils down to merging the split packages of bundles b 
> and c into bundle a:
> 
> Bundle-SymbolicName: a;
> Require-Bundle: b;visibility:=reexport, c;visibility:=reexport
> 
> Bundle-SymbolicName: b
> Export-Package: com.company.util;b=split;mandatory:=b
> Bundle-SymbolicName: c
> Export-Package: com.company.util;c=split;mandatory:=c
> 
> And I guess when you import com.company.util the resolver does not bind you 
> directly to b or c because of the 
>   b=split;mandatory:=b
> 
> Am I correct that this is ordinary use of OSGi package attributes combined 
> with the mandatory directive that should work in any framework? Or is there 
> something equinox specific in there? 
> 
> Or... does anyone have a better alternative?
> 
> Many thanks,
> 
> David 
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
> 
> 


_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to