1 Reply Latest reply on Sep 28, 2012 8:31 AM by Freeman(Yue) Fang

    Import-Package and bundle versions

    Jacek Bilski Newbie

      Hi,

       

      We have an issue with package versioning. We have a project which is built into two bundles: logic-client and logic. Logic imports 3 packages from logic-client, that is in the same version as logic itself (well, we're trying to achieve that). Furthermore there are two branches of this project, which differ in version numbers. So there are 4 bundles which we're trying to deploy onto 1 instance of FuseESB (4.3.1-03-01 if that matters):

      logic-client-1.1.0-demo

      logic-1.1.0-demo

      logic-client-1.2.1-demo-omnis

      logic-1.2.1-demo-omnis

      Problem is, the second logic deployed always uses firs logic-client deployed, although we believe we do everything OK. So for example logic-client-1.1.0-demo in it's MANIFEST.MF has:

       

      Export-Package: com.company.app.service.api; uses:="com.company.app.vo"; version="1.1.0.demo", com.company.app.vo; uses:="com.company.app.vo.util, org.slf4j"; version="1.1.0.demo", com.company.app.vo.util; uses:="com.company.app.vo"; version="1.1.0.demo"

       

      logic-1.1.0-demo has:

       

      Import-Package: com.company.app.service.api; version="1.1.0.demo", com.company.app.vo; version="1.1.0.demo", com.company.app.vo.util; version="1.1.0.demo"

       

      but nevertheless I can see in my webconsole, that the very same logic imports:

       

      com.company.app.service.api,version=1.2.1.demo-omnis from com.company.app.logic-client (211)

      com.company.app.vo,version=1.2.1.demo-omnis from com.company.app.logic-client (211)

      com.company.app.vo.util,version=1.2.1.demo-omnis from com.company.app.logic-client (211)

       

      What we're missing? I even atrificially upgraded one branch to version 1.2, so that it differs from the other branch on minor level, but nothing seems to work.

       

      Best regards

       

      Jacek Bilski

        • 1. Re: Import-Package and bundle versions
          Freeman(Yue) Fang Master

          Hi,

           

          Per OSGi spec, Import-Package: com.company.app.service.api; version="1.1.0.demo" means import this package with version range ["1.1.0.demo", ...), so any version greater than 1.1.0.demo meet the requirement.

           

          If you exactly wanna lock down the version "1.1.0.demo",  using

          version="\[1.1.0.demo, 1.1.0.demo\]"

          Freeman

           

          Edited by: ffang on Sep 28, 2012 12:07 PM

           

          Edited by: ffang on Sep 28, 2012 12:07 PM

           

          Edited by: ffang on Sep 28, 2012 12:08 PM

           

          Edited by: ffang on Sep 28, 2012 12:09 PM

           

          Edited by: ffang on Sep 28, 2012 12:15 PM

           

          Edited by: ffang on Sep 28, 2012 12:26 PM

           

          Edited by: ffang on Sep 28, 2012 12:28 PM

           

          Edited by: ffang on Sep 28, 2012 12:31 PM