In OSGi parlance, the main differences between
"require-bundle" and
"import-package" (require and import for short)
are the granularity of your
dependency and the provenance.
With require-bundle you explicitly say that you need a given
bundle (with
an id and a version range) and you get access to all of its
content
(remember that requires and import are used at runtime to
control the
visibility of classes). With import-package you say that you
just a need a
given package and that you are happy whoever provides it.
I think what matters the most in that context is the
provenance aspect.
This is for a simple overview, there are other refinements
(mostly around
the use clause) that I won't go into here and that you can
find in the OSGi
spec: http://osgi.org/osgi_technology/download_sp
ecs.asp?section=2#Release4
PaScaL
Andrew Overholt
<overholt redhat.
com>
To
Pascal
Rapicault/Ottawa/IBM IBMCA
03/28/2007 06:00
cc
PM
fedora-devel-java-list redhat.com,
linux-distros-dev eclipse.org
Subject
Please respond to Re:
[linux-distros-dev]
Andrew Overholt auto-provides and
requires for OSGi
<overholt redhat. packages
com>
Hi,
* Pascal Rapicault <Pascal_Rapicault ca.ibm.com> [2007-03-27 22:24]:
> If you are ok with running java code to generate your
RPM metadata
Unfortunately I doubt that this will be acceptable to the
RPM people.
Thanks for the pointers anyway, though
> Also, as a point of interest for me, does RPM has the
ability to express
> constraints similar to import and export?
I'm confused as to what import does that is different from
requires.
Can you please elaborate or tell me what to read?
Export I guess you could compare with Provides in RPM
parlance. Anyone
else have thoughts on this? For those that don't know --
and please
correct me if I'm wrong -- Export is used to limit what java
package
names are visible to other bundles.
Thanks,
Andrew
(See attached file: att4gg9w.dat)
_______________________________________________
linux-distros-dev mailing list
linux-distros-dev eclipse.org
https://dev.eclipse.org/mailman/listinfo/linux-distros
-dev
|