Remove implicit upper bound on guava dependency

Issue #58 resolved
Chris Fuller created an issue

I was experimenting with bumping Guava to 19 in JIRA to see how far off we are, and the fugue-guava bundle fails to initialize:

com.atlassian.plugin.PluginException: org.osgi.framework.BundleException: Unresolved constraint in bundle io.atlassian.fugue.guava [177]: Unable to resolve 177.0: missing requirement [177.0] osgi.wiring.package; (&(osgi.wiring.package=com.google.common.base)(version>=18.0.0)(!(version>=19.0.0)))

This is because libbnd's default behaviour is to set an upper bound when the version isn't specified, and the dependency on the Guava packages is coming in to a * import:

                        <Import-Package>
                            *
                        </Import-Package>

With the resulting manifest info:

Import-Package:
    com.google.common.base
        version="[18.0,19)"
    com.google.common.collect
        version="[18.0,19)"
    io.atlassian.fugue
        version="[4.3,5)"

This doesn't seem to be either intentional or helpful, so it would be good to unbound it by specifying the google packages explicitly:

                        <Import-Package>
                            com.google.common.base;version="${guava.osgi.version}",
                            com.google.common.collect;version="${guava.osgi.version}",
                            *
                        </Import-Package>

Comments (1)

  1. Log in to comment