-
1. Re: OSGi versioning does not appear to be working
gertv Aug 20, 2010 7:11 PM (in response to atum22)L.S.,
In OSGi, when a single version is specified on the import, that version number indicates the lower bound for a version range. So, an import that says 'net.sf.saxon;version:=8.7' tells the framework find a matching package export with version 8.7 or higher. The platform will then pick the highest version available to match that requirement.
You can explicitly add an upper bound to your bundle's OSGi import to make sure your bundle imports the right version, e.g. 'net.sf.saxon;version:=[8.7,9)' would tell the framework to pick version 8.7 or higher, but lower than 9.
Regards,
Gert
-
2. Re: OSGi versioning does not appear to be working
atum22 Aug 21, 2010 12:11 AM (in response to gertv)Hello Gert,
Thank you so much, adding the range identifiers is exactly what I was looking for. I am so used to Maven and have very defined versions.
I figured out how to change the version policy that the maven plugin sends to the bnd tool. I added "<_versionpolicy>[${version;==;${@}},${version;==;${@}}]</_versionpolicy>" to the instructions for the plugin, and it now does what I want.
Thanks again,
Matt
Edited by: doublematt on Aug 21, 2010 4:10 AM