On Apr 7, 2008, at 13:48, Baptiste MATHUS wrote:
Hi all,
We're using Eclipse RCP as the platform for our UI. We're almost done with dev and are beginning to look at the packaging/deployment phases.
OSGi specifies the org.osgi.framework.Version class to manage versioning by default with x.y.z.qualifier scheme. Our scheme is not very far from it, but not the same, it's something like a.b.c.d.e.qualifier (two numbers more).
So my question is simple: is this possible to inject a custom versioning scheme (for example, we could inherit/extend the current Version class to manage our case) ?
For bundles, no, the OSGi versioning is fixed. I'm not sure of the point of having so many numbers, but if you have a.b which are on the whole the same throughout other releases, you might like to call your bundle foo-a-b_c.d.e.qualifier instead. You'd lose the connection with the version comparisons but since you'd end up with different named bundles each time, you could easily do that approach.
The other thing would be to use some kind of bitshift to represent the numbers e.g. a.b.(c*1024+d*512+e*128).equalifier.
another approach would be to enforce a width on both 'd'
and 'e' and make them part of the qualifier, for example:
2.7.3.05.02...etc... where the qualifier is XX.XX....
because the qualifier is sorted using string comparison,
it should be ok if you use fixed field widths (you'd have
to enforce these field widths yourself and estimate how
wide to make them in advance.)
you might also want to consider why you need so many
version numbers, and whether you could use something
else such as a build time-stamp in the qualifier instead
(or a version control tag)
HTH
Alex
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev