Uploading Artifacts to Repository

To upload artifacts to a repository in Sonatype Nexus, you can follow these steps:

  1. Access the Nexus web interface: Open a web browser and navigate to the URL of your Nexus instance (e.g., http://localhost:8081).

  2. Log in to Nexus: Enter your Nexus credentials to log in.

  3. Navigate to the repository: In the Nexus web interface, browse or search for the repository where you want to upload the artifacts. Click on the repository name to access its details.

  4. Upload artifacts: There are multiple ways to upload artifacts to Nexus, depending on the repository type and your workflow. Here are a few common methods:

    a. Manual upload via the web interface:

    • In the repository view, click on the "Upload" button or similar option.

    • Select the artifacts you want to upload from your local filesystem using the file browser.

    • Click on the "Upload" or "Save" button to initiate the upload process.

    • Wait for the artifacts to be uploaded to Nexus. The progress and status will be displayed.

    b. Using a build tool:

    • If you are using a build tool like Maven, Gradle, or npm, you can configure your project to deploy artifacts to Nexus during the build process.

    • Update your project's build configuration to include the appropriate Nexus repository details and authentication credentials.

    • Trigger a build or package command in your build tool. The artifacts will be automatically deployed to the Nexus repository.

    c. Using the Nexus REST API:

    • If you prefer automation or integration with your own scripts or tools, you can use the Nexus REST API to programmatically upload artifacts.

    • Refer to the Nexus documentation for the specific REST API endpoints and methods to upload artifacts.

  5. Verify artifact upload: After the upload process is complete, you can verify that the artifacts are successfully uploaded by checking the Nexus web interface or using the Nexus REST API.

  6. Access uploaded artifacts: Once the artifacts are uploaded, they will be available in the Nexus repository for use by other projects or for distribution. You can browse or search for the artifacts within the repository view.

Last updated