Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-4853

OSGI metadata import-package version ranges are too narrow

    Details

    • Steps to Reproduce:
      Hide

      For example: Install infinispan-core and inifinispan-commons into an OSGI container with JGroups 3.5.1.Final, rather than 3.5.0.Final as "required". The infinispan bundles will fail to resolve.

      Show
      For example: Install infinispan-core and inifinispan-commons into an OSGI container with JGroups 3.5.1.Final, rather than 3.5.0.Final as "required". The infinispan bundles will fail to resolve.
    • Workaround Description:
      Hide

      Install the exact required dependencies and hope you never need to update them!

      Show
      Install the exact required dependencies and hope you never need to update them!

      Description

      The OSGI import-package statement is specifying specific dependencies on a number of packages, rather than a range. This makes it impossible to install Infinispan 7 in any OSGI environment that doesn't have the exact versions of the dependencies present.

      Normally, the version range for dependencies would range from the major:minor:revision of the minimum requirement, up to the next major version (exclusive).

      I've copied and pasted the "Imported Packages" output below from my Apache Felix bundle console for the infinispan-core bundle.

      The bundle will not resolve because the versions of javax.transaction, JGroups, jboss-marshalling and jboss-logging are slightly newer than those required.

      The org.osgi.service.blueprint dependency is also dubious – I'm not sure you usually have a runtime dependency on this package (even if you use Blueprint).

      For example, the following statement...

      org.jboss.marshalling;version="[1.4.4.Final,1.4.4.Final]"

      ...should probably be...

      org.jboss.marshalling;version="[1.4.4.Final,2)"

      ...in order to comply with standard semantic versioning policy.

      Felix output:
      javax.management from org.apache.felix.framework (0)
      javax.naming from org.apache.felix.framework (0)
      javax.security.auth from org.apache.felix.framework (0)
      javax.transaction,version=[1.1.0,1.1.0] – Cannot be resolved
      javax.transaction.xa,version=[1.1.0,1.1.0] – Cannot be resolved
      javax.xml.namespace from org.apache.felix.framework (0)
      javax.xml.parsers from org.apache.felix.framework (0)
      javax.xml.stream from org.apache.felix.framework (0)
      javax.xml.transform from org.apache.felix.framework (0)
      javax.xml.transform.dom from org.apache.felix.framework (0)
      javax.xml.transform.stream from org.apache.felix.framework (0)
      net.jcip.annotations from com.springsource.net.jcip.annotations (62)
      org.infinispan.commons,version=[7.0.0.CR1,7.0.0.CR1] from org.infinispan.commons (159)
      org.infinispan.commons.api,version=[7.0.0.CR1,7.0.0.CR1] from org.infinispan.commons (159)
      org.infinispan.commons.configuration,version=[7.0.0.CR1,7.0.0.CR1] from org.infinispan.commons (159)
      org.infinispan.commons.equivalence,version=[7.0.0.CR1,7.0.0.CR1] from org.infinispan.commons (159)
      org.infinispan.commons.executors,version=[7.0.0.CR1,7.0.0.CR1] from org.infinispan.commons (159)
      org.infinispan.commons.hash,version=[7.0.0.CR1,7.0.0.CR1] from org.infinispan.commons (159)
      org.infinispan.commons.io,version=[7.0.0.CR1,7.0.0.CR1] from org.infinispan.commons (159)
      org.infinispan.commons.logging,version=[7.0.0.CR1,7.0.0.CR1] from org.infinispan.commons (159)
      org.infinispan.commons.marshall,version=[7.0.0.CR1,7.0.0.CR1] from org.infinispan.commons (159)
      org.infinispan.commons.marshall.jboss,version=[7.0.0.CR1,7.0.0.CR1] from org.infinispan.commons (159)
      org.infinispan.commons.util,version=[7.0.0.CR1,7.0.0.CR1] from org.infinispan.commons (159)
      org.infinispan.commons.util.concurrent,version=[7.0.0.CR1,7.0.0.CR1] from org.infinispan.commons (159)
      org.infinispan.commons.util.concurrent.jdk8backported,version=[7.0.0.CR1,7.0.0.CR1] from org.infinispan.commons (159)
      org.jboss.logging,version=[3.1.2.GA,3.1.2.GA] – Cannot be resolved
      org.jboss.marshalling,version=[1.4.4.Final,1.4.4.Final] – Cannot be resolved
      org.jboss.marshalling.util,version=[1.4.4.Final,1.4.4.Final] – Cannot be resolved
      org.jgroups,version=[3.5.0.Final,3.5.0.Final] – Cannot be resolved
      org.jgroups.blocks,version=[3.5.0.Final,3.5.0.Final] – Cannot be resolved
      org.jgroups.blocks.mux,version=[3.5.0.Final,3.5.0.Final] – Cannot be resolved
      org.jgroups.jmx,version=[3.5.0.Final,3.5.0.Final] – Cannot be resolved
      org.jgroups.logging,version=[3.5.0.Final,3.5.0.Final] – Cannot be resolved
      org.jgroups.protocols,version=[3.5.0.Final,3.5.0.Final] – Cannot be resolved
      org.jgroups.protocols.relay,version=[3.5.0.Final,3.5.0.Final] – Cannot be resolved
      org.jgroups.protocols.tom,version=[3.5.0.Final,3.5.0.Final] – Cannot be resolved
      org.jgroups.stack,version=[3.5.0.Final,3.5.0.Final] – Cannot be resolved
      org.jgroups.util,version=[3.5.0.Final,3.5.0.Final] – Cannot be resolved
      org.osgi.service.blueprint,version=[1.0.0,2.0.0) – Cannot be resolved
      org.w3c.dom from org.apache.felix.framework (0)
      org.xml.sax from org.apache.felix.framework (0)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                isavin Ion Savin
                Reporter:
                andrew_scully Andrew Scully
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: