-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.0 M3
-
Fix Version/s: 7.0.0 M3
-
Labels:None
-
Git Pull Request:
There are two sets of portlet package exports being exported from the "system bundle".
One is version 0.0.0 (from the portlet jar), the other is version 2.0.0 (from our system.packages.extra)
We should not explicitly publish a version since we don't control that code and it's not an API which is semantically versioned.
Instead export a portlet capability in the form of an "osgi.contract" capability:
Provide-Capability: osgi.contract;osgi.contract=JavaPortlet;version:Version=1; uses:="javax.portlet", osgi.contract;osgi.contract=JavaPortlet; version:Version=2; uses:="javax.portlet, javax.portlet.filter"
Then an OSGi bundle can declare this requirement as:
Import-Package: javax.portlet
Require-Capability:
osgi.contract; filter:="(&(osgi.contract=JavaPortlet)(version=1))"
OR
Import-Package: javax.portlet, javax.portlet.filter
Require-Capability:
osgi.contract; filter:="(&(osgi.contract=JavaPortlet)(version=2))"