While I agree that default packages are bad, sometimes they are
unavoidable with legacy code.

If we really wanted to OSGi could devise a way to express the
default package in an Export-Package/Import-Package statement.
In Equinox we have experimented with using '.' to specify the
default package.  As far as being able to distiguish between
the different default packages ... is this not the same issue
as having muliple versions of a normal package?  You need to
use matching attributes to distinguish the different packages

For example:

Export-Package: .;legacy-lib-name="abc";version="1.0"

Export-Package: .;legacy-lib-name="xyz";version="1.0"

Import-Package: .;legacy-lib-name="abc";version="1.0"

Import-Package: .;legacy-lib-name="xyz";version="1.0"

This allows you to pick the default package from either the abc
or xyz legacy library.

Tom

> Can't do it.
>
> There is no way to express the default package in OSGi...the main reason
> is there would be no way to distinguish one bundle's default package
> with another's. And you couldn't just combine them all, since this would
> lead to naming conflicts.
>
> -> richard
>
> John Wells wrote:
> > How do I export the "root" package?  In otherwords, a package with no
> > name.  I know, I know, it isn't too smart... but I'm dealing with legacy
> > code here...
> >
> > Any idea?
> >
> > John Wells (Aziz)
> > [EMAIL PROTECTED]
> >  
> >>> Register now for BEA World 2006 --- See http://www.bea.com/beaworld<<
> >>>      
> > _______________________________________________________________________
> > Notice:  This email message, together with any attachments, may contain
> > information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> > entities,  that may be confidential,  proprietary,  copyrighted  and/or
> > legally privileged, and is intended solely for the use of the individual
> > or entity named in this message. If you are not the intended recipient,
> > and have received this message in error, please immediately return this
> > by email and then delete it.
> > _______________________________________________
> > osgi-dev mailing list
> > osgi-dev@bundles.osgi.org
> > http://bundles.osgi.org/mailman/listinfo/osgi-dev
> >  
> _______________________________________________
> osgi-dev mailing list
> osgi-dev@bundles.osgi.org
> http://bundles.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
osgi-dev mailing list
osgi-dev@bundles.osgi.org
http://bundles.osgi.org/mailman/listinfo/osgi-dev

Reply via email to