Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-51889

fix system bundle portlet package exports so there aren't two

    Details

      Description

      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))"
      

        Attachments

          Activity

            People

            Assignee:
            albert.lee Albert Lee (Inactive)
            Reporter:
            raymond.auge Raymond Auge
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              7 years, 6 weeks, 3 days ago

                Packages

                Version Package
                7.0.0 M3