Reputation: 35795
Is it possible to save key/value pairs along with artifacts in Nexus?
At the moment, we are using 2.14, but I would also be interested in the situation with Nexus 3.
If so, do they need to be deployed along with the artifact, or can they be set later (by REST or something similar)?
I would like to store meta-information and wonder whether I need an additional database.
Upvotes: 0
Views: 763
Reputation: 5318
It would be best to upgrade to Nexus Repo 3 and use the new tagging API (the old Nexus 2.x custom metadata API doesn't have an upgrade path).
The Nexus Repo 3 REST API endpoint is:
POST /service/rest/v1/tags/associate/{tagName}
An example:
curl -u admin:admin123 -X POST 'http://127.0.0.1:8081/service/rest/v1/tags/associate/project-abc-142?repository=my-company&group=com.mycompany&name=project-abc&version=2.1.1'
Note however, that in both versions tagging is a pro feature, and requires a license.
Reference: https://help.sonatype.com/display/NXRM3/Tagging
Upvotes: 1