I use osgi/equinox and while browsing one of our bundles MANIFEST.MF file I have encountered strange line:
Export-Package: package.a.b.c;dynamic=domain
What does it mean that the package is exported with dynamic=domain option and how does it differ from regular export (without any additional options)?
You can add as many custom attributes to an Export-Package clause as you want. On the other side (Import-Package), you can specify that only the package with the specific attribute is good for you.
See the chapter 3.6.5 Export-Package of OSGi core specification:
The following attributes are part of this specification:
version - The version of the named packages with syntax as defined in Version on page 35. It defines the version of the associated packages. The default value is 0.0.0.
specification-version - An alias for the version attribute only to ease migration from earlier versions. If the version attribute is present, the values must be equal.
Additionally, arbitrary matching attributes may be specified. See Attribute Matching on page 58
And see the chapter 3.7.7 Attribute Matching of OSGi core specification:
For example, the following statements will match.
A: Import-Package: com.acme.foo;company=ACME
B: Export-Package: com.acme.foo; «
company="ACME"; «
security=false
Attribute values are compared string wise except for the version and bundle-version attributes which use version range comparisons. Leading and trailing white space in attribute values must be ignored.
Please note that I cited only some parts of these chapter. You should check the original in the spec.
I do not think these attributes are handled in a specific way in the code of Equinox. They can be used in Import-Pacakge clauses if there are multiple packages with the same name.