title: Semantic versioning (semver) versus Maven convention versus artifact repository conventions - What versioning scheme to use?
body: <p>I am setting up a versioning scheme for a greenfield project and read a lot about <a href="https://semver.org/" rel="nofollow noreferrer">semver</a> and <a href="https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN8855" rel="nofollow noreferrer">the Maven convention</a>. I'm using the Nexus OSS repo manager (v3.13.0).</p>
  
  <p>It's hard to settle on an authoritative scheme when in comes to versioning but I believe in the power of convention. While the semver document (link above) seems well written I notice clashes with how Maven seems to treat version numbers. The goal is to settle on a scheme that gives good ordering. Semver mentions that the pre-release label (the part that follows <code>Major.Minor.Patch-</code>) may have dot-separated segments, some of which <strong>are numeric and are to be compared as such</strong>, so one should not have zero padding such as <code>RC.09</code>. In practice, however, Maven (oracle link above, but is that authoritative?) treats everything after the first dash as one alphanumeric field, hence, one should use <code>RC09</code> and <code>RC10</code>.</p>
  
  <p><strong><em>My question is, use zero-padding or not? I would love to adhere to <code>semver</code>, but I also need something that works.</em></strong></p>
  
  <p>The added complexity is I'm not using Maven, but Gradle! But does that even matter? --> where is version ordering computed, in the build system or in the repo manager (Nexus in my case). See <a href="https://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-syntax.html" rel="nofollow noreferrer">what Nexus says on the topic</a> - BUT, it references Maven, so I'm not sure if that applies to Gradle clients (or rather, to the <a href="https://docs.gradle.org/current/userguide/publishing_maven.html" rel="nofollow noreferrer">maven-publish</a> plug-in). Then again, Gradle tries to mimic Maven when it comes to publishing standards. It's a mess!</p>