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
-
Labels:
-
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.