Bundle-Version format in MANIFEST.MF differs from Maven coordinate's version
veita opened this issue · comments
Description
The format of the Bundle-Version format in MANIFEST.MF differs from Maven version. Manifest uses .jre
while Maven version has -jre
as suffix.
This makes it necessary to map the suffixes in places where checks for equality between the two values are made.
Example
`Bundle-Version: 32.1.1.jre` vs. `32.1.1-jre` (https://repo1.maven.org/maven2/com/google/guava/guava/maven-metadata.xml).
Expected Behavior
Version format is consistent.
Actual Behavior
Version format differs.
Packages
No response
Platforms
No response
Checklist
- I agree to follow the code of conduct.
I know very little about OSGi, so take all this with a grain of salt.
We do whatever the Apache Felix maven-bundle-plugin
does. It apparently normalizes separators to periods, as required by the OSGi specification. So I suspect that any code that relies on the two versions to match is broken. (It sounds like there may be other problems with trying to match version numbers between Maven, SemVer, and OSGi. Not to mention that it's iffy not just under OSGi but also under the other systems for our 32.1.1.-jre
and 32.1.1.-android
to expose different APIs.)
I suspect that there is nothing we can do here, but let me know if you know more.
Closing on the theory I laid out above, but I'm happy to reconsider if there is something better that we can do.
I suspect that there is nothing we can do here, but let me know if you know more.
Thank you for your response. I wasn't aware of the fact that OSGI requires the dot as a qualifier separator. We'll rewrite our test to match against the version from the META-INF/maven/com.google.guava/guava/pom.properties
.