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

Asset search does not treat short and long parameter names the same

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.6.1
    • Fix Version/s: 3.7.0
    • Component/s: Search
    • Labels:
      None
    • Story Points:
      1

      Description

      Using the shortened parameter names produces the expected result:

      http -a admin:admin123 GET ':8081/service/siesta/rest/beta/search/assets?maven.groupId=org.osgi&maven.artifactId=org.osgi.core&maven.baseVersion=4.3.1&maven.extension=pom'
      HTTP/1.1 200 OK
      Content-Length: 518
      Content-Type: application/json
      Date: Wed, 29 Nov 2017 23:32:29 GMT
      Server: Nexus/3.7.0-SNAPSHOT (OSS)
      X-Content-Type-Options: nosniff
      X-Frame-Options: SAMEORIGIN
      
      {
          "continuationToken": null,
          "items": [
              {
                  "checksum": {
                      "md5": "3d87a59bcdb4b131d9a63e87e0ed924a",
                      "sha1": "79391fc69dd72ad1fd983d01b4572f93f644882b"
                  },
                  "downloadUrl": "http://localhost:8081/repository/maven-central/org/osgi/org.osgi.core/4.3.1/org.osgi.core-4.3.1.pom",
                  "format": "maven2",
                  "id": "bWF2ZW4tY2VudHJhbDplMDE4OGVkMDcyOGZhNjhmNDExNzU2OGU1MjQ2NjZiYg",
                  "path": "org/osgi/org.osgi.core/4.3.1/org.osgi.core-4.3.1.pom",
                  "repository": "maven-central"
              }
          ]
      }
      

      But using the long name for extension does not:

      http -a admin:admin123 GET ':8081/service/siesta/rest/beta/search/assets?maven.groupId=org.osgi&maven.artifactId=org.osgi.core&maven.baseVersion=4.3.1&assets.attributes.maven2.extension=pom'
      HTTP/1.1 200 OK
      Content-Length: 988
      Content-Type: application/json
      Date: Wed, 29 Nov 2017 23:32:51 GMT
      Server: Nexus/3.7.0-SNAPSHOT (OSS)
      X-Content-Type-Options: nosniff
      X-Frame-Options: SAMEORIGIN
      
      {
          "continuationToken": null,
          "items": [
              {
                  "checksum": {
                      "md5": "8053bbc1b55d51f5abae005625209d08",
                      "sha1": "5458ffe2ba049e76c29f2df2dc3ffccddf8b839e"
                  },
                  "downloadUrl": "http://localhost:8081/repository/maven-central/org/osgi/org.osgi.core/4.3.1/org.osgi.core-4.3.1.jar",
                  "format": "maven2",
                  "id": "bWF2ZW4tY2VudHJhbDpkMDY0ODA0YThlZDVhZDZlNjhmZGU5MWNmM2NiZTgzMw",
                  "path": "org/osgi/org.osgi.core/4.3.1/org.osgi.core-4.3.1.jar",
                  "repository": "maven-central"
              },
              {
                  "checksum": {
                      "md5": "3d87a59bcdb4b131d9a63e87e0ed924a",
                      "sha1": "79391fc69dd72ad1fd983d01b4572f93f644882b"
                  },
                  "downloadUrl": "http://localhost:8081/repository/maven-central/org/osgi/org.osgi.core/4.3.1/org.osgi.core-4.3.1.pom",
                  "format": "maven2",
                  "id": "bWF2ZW4tY2VudHJhbDplMDE4OGVkMDcyOGZhNjhmNDExNzU2OGU1MjQ2NjZiYg",
                  "path": "org/osgi/org.osgi.core/4.3.1/org.osgi.core-4.3.1.pom",
                  "repository": "maven-central"
              }
          ]
      }
      

      These two searches should produce the same result, since maven.extension is mapped to assets.attributes.maven2.extension.

        Attachments

          Activity

            People

            Assignee:
            bradbeck Brad Beck
            Reporter:
            bradbeck Brad Beck
            Last Updated By:
            Peter Lynch
            Team:
            Nexus - Core
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                tigCommentSecurity.panel-title