Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-24220

Nexus API, version-based sorting is wrong

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Duplicate
    • Affects Version/s: 3.21.2
    • Fix Version/s: None
    • Component/s: Maven, REST, Search
    • Labels:
    • Environment:
      Nexus instance on a CentOS Linux, with JDK 1.8

      Description

      This search:

      https://knetminer.org/artifactory/service/rest/v1/search/assets?sort=date&direction=desc&repository=maven-releases&maven.groupId=net.sourceforge.ondex.apps&maven.artifactId=installer&maven.classifier=packaged-distro&maven.extension=zip

      Is currently yielding versions 3.0-RC1 and 3.0-RC before 3.0. That's wrong in most cases, release candidates, alfas, betas, or alike come before 3.0.

      I'm not sure if the sorting criterion can be generalised into x.y?* < x.y, unless ? is '.'
      An alternative could be that certain patterns are considered pre-release postfixes. Another alternative might be an API parameter to filter results by regex (which, of course, I can apply after the API call, but having it straight in the API would make things easier). Or is the latter already available?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              mbrandizi Marco Brandizi
              Last Updated By:
              Peter Lynch
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title