In case 1 you have 2 export definitions and in case 2 there are 3. The
spec says that an export definition describes an export for a SINGLE
package. The shortcut to specify multiple definitions with the same
set of attributes is just syntactic sugar ...
So you were right :-)
Kind regards,
Peter Kriens
On 13 aug 2008, at 09:51, Fei Wang wrote:
Hi, I’m confused by the R4 core spec. section 3.5.5, Export-Package
Header (and also the import-package header), it says:
Export-Package ::= export ( ’,’ export )*
export ::= package-names ( ’;’ parameter )*
package-names ::= package-name // See 1.4.2
( ';' package-name )*
The header allows many packages to be exported. An export definition
is the description of a single package export for a bundle. Multiple
export definitions for the same package are allowed for example,
when different attributes are needed for different importers.
So what does an ”export definition” really mean?
According to the syntax, I can write this:
1) Export-Package: foo, bar;version=1.0.0
and
2) Export-Package: foo; bar;version=1.0.0, bar;version=1.0.1
As we know in case 1 the version attribute is only applied to
package bar, and in case 2, it applied to both foo and bar, right?
OK, the question is: how many export definitions are there in case 1
and 2?
My thought is that in case 1, there are two export definitions: foo
with default version 0.0.0 and bar with version 1.0.0; in case 2,
there are three export definitions, foo with version1.0.0, bar with
version 1.0.0, and bar with version 1.0.1.
Am I right?
Thanks!
Fei
_______________________________________________
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