I have an issue where I am building a war using maven war plugin and overlaying it using bnd plugin as described in Adding OSGi metadata to existing projects without changing the packaging type. This project defines the following dependency:
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.12</version>
</dependency>
When I run the build, it generates the following entry in MANIFEST.MF
Import-Package: .., javax.ws.rs.core, ..
As soon as I change the version to 1.13 or higher the Import-Package entry becomes:
Import-Package: .., javax.ws.rs;version="[1.1,2)", ..
Which becomes a real problem for me because my target has javax.ws.rs.javax.ws.rs-api_2.0.0.m16 in it. Which will resolve the import for the no version required case, but stops doing so when the range restriction is there.
So, my general question is: How does bnd decide that version range? Something changed between the two minor releases to make it go from no version restriction to that particular range so I think understanding how bnd makes that decision will help lead me to discovering what this particular issue is.