Bootstrap FreeKB - Nexus - Upload files to a repository
Nexus - Upload files to a repository

Updated:   |  Nexus articles

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.

  1. In the left panel of Nexus, select Browse.
  2. 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.
  3. Select Upload component.
  4. 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)
  5. 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 Buy Me A Coffee



Comments


August 29 2022 by @$#
Thanks for the step by step procedure. Helps a lot

August 02 2023 by Tushar Heda
I am not able to find the folders at server level after uploading the same from nexus3 web

Add a Comment


Please enter cce23d in the box below so that we can be sure you are a human.