Here's what I think I've understood out of my reading and my experimentation:

Maven's version numbers have forms like this:

major[.minor[.fix]]-[blahblahblah[-buildnr]]

Where major, minor, fix are parsed and compared as integers. Assumed to be zero if missing?

blahblahblah is parsed and compared asciibetically. buildnr is just a convention. one might think that it's compared numerically, but in fact, it's not. (Maven definitive guide).

Ah, but then there are snapshots too. Can we combine some arbitrary text (blahblahblah) with a SNAPSHOT? I don't know, but this works:

major[.minor[.fix]]-SNAPSHOT

This doesn't:

  Branchname-SNAPSHOT
  OtherBranchname-SNAPSHOT

(Maven seems to pay attention only to the relative newness of the SNAPSHOT and ignore the Branchname when resolving dependencies. This has forced my to give hard version numbers to in-development branches earlier than I'd like to.)

The snapshot expands to something like this: 20080818.084237-2, which seems to include a build number.

What happens when the two conflict? i.e.

20080818.010000-2 cmp? 20080818.230000-1

Is this build number also compared asciibetically? (Not that it's likely to matter since the time stamp changes.)

So, are the following true? :

1 = 1.0.0
1 < 1.0.1
9.0.0 < 10.0.0
1.0.0 < 1.0.0-01
1.0.0 < 1.0.0-00
1.0.0-Apple-09 < 1.0.0-Zed-01
1.0.0-SNAPSHOT < 1.0.0
1.0.0-SNAPSHOT < 1.0.0-01

What about these:

1.0.0-Anteaters < 1.0.0-Zebras
1.0.1-Anteaters > 1.0.0-Zebras
SNAPSHOT < 0.0.0
Anteaters-SNAPSHOT cmp? Zebras-SNAPSHOT

I find myself flailing around more than I'd like on questions relating to versioning. (Dependency resolution; Wether to keep my trunks as SNAPSHOTs, and if so of what? Can the maintenance branch stay at 2.3.0- SNAPSHOT, even though the maintenance releases 2.3.0-01 is out already? Is this a misuse of build numbers? Should I sacrifice the last position in the version number instead?)

What's missing for me is a rigorous understanding of how maven views version numbers. Surely maven *has* rigorous ideas about this? It would seem to be *the* most central concept in making maven workable.

hoping for enlightenment,
Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to