Ordering of versions
Eric Johnson
eric at tibco.com
Wed Nov 9 11:22:58 PST 2011
Is it even possible to solve this problem with just a version string?
Maven and OSGi (currently) have incompatible version schemes. In some
cases, what Maven would consider less than another version number, OSGi
would consider greater (the "snapshot" problem).
The only general way that I can think of to solve this is to indicate
somewhere with metadata which version string semantics are in effect,
and apply those semantics within the scope of the indicated metadata.
-Eric.
On 11/9/11 8:02 PM, Brian Pontarelli wrote:
> It seems obvious from your example that lexicographic is probably going to cause issues and confusion. Perhaps it makes sense to define a set of well know and commonly used names and the order they have. I would assume this would be simple to get a majority on.
>
> Sent from my iPhone
>
> On Nov 9, 2011, at 9:37 AM, mark.reinhold at oracle.com wrote:
>
>> 2011/11/9 7:47 -0800, gnormington at vmware.com:
>>> I see. How are the tokens of a qualifier compared? If they are compared
>>> just like the initial part,
>> Yes.
>>
>>> then that would be a numeric comparison for
>>> numeric tokens, but what about non-numeric tokens like BETA and GA?
>> They are compared lexicographically, so BETA< GA.
>>
>>> Are
>>> tokens compared as strings if at least one of the tokens being compared
>>> is non-numeric?
>> Yes.
>>
>>> Or I can read the code if you prefer to send me a link. ;-)
>> http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/file/960eb03d1270/src/share/classes/org/openjdk/jigsaw/JigsawVersion.java
>>
>> - Mark
More information about the jigsaw-dev
mailing list