Skip to content

display-dependency-updates version comparison algorithm bug for -pfd #744

Description

@garretwilson

I have the following managed dependency in my Maven POM:

<dependency>
  <groupId>javax.faces</groupId>
  <artifactId>javax.faces-api</artifactId>
  <version>2.3</version>
  <scope>provided</scope>
</dependency>

However when I invoke mvn versions:display-dependency-updates, Versions Maven Plugin shows me:

javax.faces:javax.faces-api ........................... 2.3 -> 2.3-pfd

Offhand I don't know what -pfd means (pre-final-deliverable?), but that's irrelevant. You can see on Maven Central that this version was released before v2.3.

The semantic versioning specification says that any -* suffix (which would include -pfd) is considered a "pre-release" version. Thus 2.3-pfd is considered a pre-release version of 2.3 and should not be listed as a new available version. (The specification then goes on to explain how to calculate version precedence for pre-release suffixes, but that's even not the case here, as any pre-release version should not appear greater than the release version.)

(On a related note, the specification also says that version metadata, that is suffixes beginning with +*, must be completely ignored when determining version precedence.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions