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

Scripting allows creation of “unnamed” repositories which cannot be deleted

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Parked
    • Affects Version/s: 3.16.0, 3.17.0
    • Fix Version/s: None
    • Component/s: Scripting
    • Notability:
      3

      Description

      It appears that it is possible to create hosted raw repositories with an empty “name” property when using the scripting API. The resulting repositories can not be deleted and have invalid URLs.

      Run the following Groovy script:

      import org.sonatype.nexus.repository.manager.*;
      
      repository.createRawHosted('')

       

      On the web UI, as name "NX.coreui.model.Repository-1" is displayed, with the URL "http://localhost:8081/repository//"

      The repositories REST API returns:

      "name" : "",
      "format" : "raw",
      "type" : "hosted",
      "url" : "http://localhost:8081/repository/"
      

       

      Deletion via UI fails with the message:

      "Cannot get property 'format' on null object" 

      ...and the logs show a NullPointerException.

       

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            rlaun Roland Laun
            Last Updated By:
            Rich Seddon Rich Seddon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title