[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] Customize versioning scheme
- From: "Stuart McCulloch" <mcculls@xxxxxxxxx>
- Date: Mon, 7 Apr 2008 21:42:00 +0800
- Delivered-to: firstname.lastname@example.org
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=QowQ90ks2+JZxGXCve9Fs8cO29CJULgKX7K79y/haBiMQjogjd/r10au+SYXU7z73fjwWy6cW3DCIUNO9T9xfZLfPrCCsyMlz3qq6U/luhTAQoAfp0YntaUfa7kcqGUeDgQb+u31D3gFkP1Snr1RVXGo0p5O3Tu3mxi2STLxeT8=
On 07/04/2008, Alex Blewitt <alex.blewitt@xxxxxxxxx> wrote:
On Apr 7, 2008, at 13:48, Baptiste MATHUS wrote:
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)
equinox-dev mailing list