Reputation: 1311
We have just installed Sonatype Nexus 3.1.0-04 and I remember from V2 that a hosted Nuget (local) could point to an existing directory. It seems that this is not possible with V3? Where you have to publish each package manually. Issue is that we have a lot of own packages and manually pushing them would be slow.
Any way of bulk uploading them to Nexus? Or perhaps place them in a Nexus directory?
Upvotes: 1
Views: 1484
Reputation: 3292
there is no way to do this by pointing Nexus at a local directory, however you could write either a batch file or a shell script (depending on what OS you are running) that uses something akin to using find and curl to upload to the NuGet repository.
Here is an example of how to do this via curl:
curl -u <username>:<password> -X PUT -v -include -F package=@<path-to-nupkg> <nexus-nuget-repository-url>
with some example values:
curl -u admin:admin123 -X PUT -v -include -F package=@src/test/resources/SONATYPE.TEST.1.0.nupkg http://localhost:8081/repository/nuget-hosted/
There's a good example of this over at: using find and curl to upload a directory contents
Upvotes: 3