Skip to content

Incorrect version examples with SemVer v2 build metadata, which is not allowed in POM versions #1595

Description

@gh-andre

Bug description

In this section describing recommended version naming:

https://maven.apache.org/guides/mini/guide-naming-conventions.html#version-identifier

, the examples show build metadata:

// Build metadata
1.2.3+dfc0c87
2.3.4+15433

However, SemVer v1, which is explicitly referenced at the top of the section, does not define syntax build metadata.

Moreover, POM's detailed guide below explicitly calls out that the + character has no special meaning in POM.

https://maven.apache.org/pom.html#version-order-specification

Important: This is only true for Semantic Versioning 1.0.0. The Maven version order algorithm is not compatible with Semantic Versioning 2.0.0. In particular, Maven does not special case the plus sign or consider build identifiers.

In addition to removing the incorrect examples, I would also suggest adding an explicit note about + not considered as a special character, so build metadata, if present, will be considered as a Maven qualifier. Might also be worth mentioning SemVer case sensitivity is ignored in Maven version comparisons.

Maven site URL where bug exists

https://maven.apache.org/guides/mini/guide-naming-conventions.html#version-identifier

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions