Hi Sana, If there's a single version on a package in the Import-Package header, that version represents the lower limit. So, in your case, a single version 2.5.0 actually means that the framework can wire it to any version equal to or higher than 2.5.0 - it will usually pick the highest version available in that case. If you want to limit that, you will have to add an upper limit as well by specifying a version range, e.g. [2.5.0,2.6.0) - that will make sure that any version 2.5.x is OK but it will not select a package with version 2.6.0 or above.
Regards, Gert Vanthienen On Thu, Sep 18, 2014 at 4:06 AM, Sana <[email protected]> wrote: > Hi, > > I am trying to install a jar A in servicemix. It's a regular jar, so I have > used wrap protocol and trying to import a package(of x version) from a > bundle y (y is also a regular jar, that has been wrap and install). However, > A imports the package of version xxx from another servicemix bundle yyy. I > am not sure if I am doing something wrong here. > > The bundle A shows the imported package as > > Imported Packages javax.servlet,version=2.6.0 from > org.apache.geronimo.specs.geronimo-servlet_3.0_spec (91) > javax.servlet,version=3.0.0 from > org.apache.geronimo.specs.geronimo-servlet_3.0_spec (91) > javax.servlet.http,version=2.6.0 from > org.apache.geronimo.specs.geronimo-servlet_3.0_spec (91) > javax.servlet.http,version=3.0.0 from > org.apache.geronimo.specs.geronimo-servlet_3.0_spec (91) > > And Manifest info has > > &Import-Package=javax.servlet; version=2.5.0, javax.servlet.http; > version=2.5.0, > Import-Package: javax.servlet; version="2.5.0", javax.servlet.http; > version="2.5.0" > Manifest-Version: 1.0 > Originally-Created-By: Apache Maven 3.1.1 > > > I am not sure how the bundle is importing version 2.6.0 when i have > explicitly defined 2.5.0. > > Appreciate your help. > > > Thanks! > > > > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/Import-package-in-features-xml-not-working-tp5721661.html > Sent from the ServiceMix - User mailing list archive at Nabble.com.
