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

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
    • 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"

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




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




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |