
In the Nexus Repository Manager web browser, select Browse and make note of the format of the repository that you want to upload files to.
Maven repository
Lets say you want to upload files to a repository that is using the Maven format. You can either upload an individual file, such as foo.txt, or an archive that contains multiple files, such as foo.zip.
- In the left panel of Nexus, select Browse.
- Select the repository that you want to upload a file to. If not signed in, you may need to sign in to see the repository.
- Select Upload component.
- In the Upload form, enter the following:
- File - Select the individual file (such as foo.txt) or archive (such as foo.zip) to upload
- Classifier - Some unique file name (not required)
- Extension - The file extension, such as txt or zip. Do not include the period before txt or zip!
- Group ID - This will be the name of the root folder (base in this example)
- Artifact ID - This will be the name of the second folder (core in this example)
- Version - This will be the name of the third folder (1.0 in this example)
- Select Upload.
In this example, foo.zip will be uploaded to the repository named my-repo.
Now, when viewing the repository, you should the directory structure you created (base > core > 1.0) and below the third folder will be a .zip file. In this example, the name of the file is core-1.0.zip, and core-1.0.zip will contain whatever files were in the foo.zip archive.
You could then use the curl command to download files in Nexus, like this.
curl -u "username:password" -o "/tmp/foo.zip" "http://nexus.example.com/repository/my-repo/base/core/1.0/core-1.0.zip"
Did you find this article helpful?
If so, consider buying me a coffee over at