[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] Resolver Problem with guava and e4 (javax.annotation)
- From: BJ Hargrave <hargrave@xxxxxxxxxx>
- Date: Fri, 11 Jul 2014 10:27:15 -0400
- Delivered-to: email@example.com
Importing what you export is only useful
when the bundle contains other packages which actually use the exported
package. For example, a bundle implements the OSGi Event Admin service.
That bundle can export the org.osgi.service.event package and also import
it. The bundle is happy to use any (version matching) org.osgi.service.event
But if the bundle is just a "container"
of packages which it exports for other and does not itself use the packages
in anyway, then there is less value in also importing the packages. Say
a bundle just contains the org.osgi.service.event package and exports it
as well as imports it. If this bundle is resolved to import the package,
the bundle is essentially empty. It is not exporting the package and has
no other packages.
I don't know the make up of the bundles
in question here. But is may or may not make sense to import the packages
being exported. What the bundle contains will influence the choice. That
being said, there is little harm in also importing the packages, so it
is a safe (but perhaps of little value) choice.
Andreas Sewe <andreas.sewe@xxxxxxxxxxxxxx>
Resolver Problem with guava and e4 (javax.annotation)
David M Williams wrote:
> I notice in Orbit, all our "javax.annotation" bundles follow
> what you export pattern .... that's good, such as
> *Export-Package*: javax.annotation;/version/="1.2.0",
> *Import-Package*: javax.annotation;/version/="1.2.0",
Is this "import what you export" best practice for *all* javax.*
in Orbit? As far as I can see, some of them don't follow this policy
(javax.xml.bind, for example, whose packages are also provided by the
system bundle provides at least from Java 7 onwards) and I am wondering
whether it's worth opening bugs for this.
The knowledge transfer company
Robert-Bosch-Str. 7, 64293 Darmstadt
Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940
equinox-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit