Skip to content

maven: Use most recent release of a package as default version

artifacts list sent by the lister is not guaranteed to be sorted by artifact time so the last element is not necessarily the most recent artifact (see for instance the releases of that maven origin, the default version (star icon) does not target the most recent release.

So ensure to use the most recent artifact as default version by sorting the artifacts by their ISO 8601 date representation (designed for lexicographical sort). If a date failed to be parsed by the lister (edge case but can happen), the time value will be an empty string so the sort operation will not end up with error.

Related to T3874


Migrated from D7728 (view on Phabricator)

Merge request reports