I had a general query about maven versioning numbers. Are there some specific rules to giving version numbers to SNAPSHOT or RELEASE for a maven based project? E.g. we have multiple rules for variable naming like we cannot start with a digit. Likewise, do we have any such specific rules violating which does not allow the artifact gets published? I came across such a situation where I provided version number like X.YY-SNAPSHOT(say 2.56-SNAPSHOT) and it failed to publish properly. When I changed that to X.Y.Z-SNAPSHOT, it worked fine. I tried to find information related to this but couldn't hit any properly.
Please enlight me here.
No, technically, you can use any combination of numbers, dots, hyphens and letters as a version number. Something like 2.56-SNAPSHOT
is totally fine.
Of course, some organisations might introduce further restrictions, e.g. that a version number has to have the form x.y.z-SNAPSHOT
but this is not a Maven thing.