Help Center/ CodeArts Artifact/ Getting Started/ Uploading Artifacts to a Maven Repository
Updated on 2026-01-16 GMT+08:00

Uploading Artifacts to a Maven Repository

During development, developers often need to share packages with teammates. Self-hosted repos provide a shared space to store and upload these packages, making it easy for others to access and use them.

This document describes how to upload Artifacts to Maven repository, helping you quickly get started. Figure 1 shows the main operation process.

Figure 1 Uploading artifacts to a Maven repository

Follow these steps to upload artifacts to a Maven repository:

  1. Access the CodeArts Artifact homepage. Before using CodeArts Artifact, go to the CodeArts Artifact homepage.
  2. Create a project and access its self-hosted repos: Create a project on the CodeArts homepage. Then, access the self-hosted repos in the project.
  3. Create a repository: Create a Maven repository.
  4. Upload Maven artifacts on the self-hosted repo page: Upload an artifact to a Maven repository on the self-hosted repo page.

Logging In to CodeArts Artifact Homepage

  1. Log in to the Huawei Cloud console.
  2. Click in the upper-left corner of the page and choose Developer Services > CodeArts Artifact from the service list.
  3. Click Access Service. The homepage of CodeArts Artifact is displayed.

Creating a Project and Accessing its Self-Hosted Repos

  1. Log in to the Huawei Cloud console with your Huawei Cloud account.
  2. Click in the upper-left corner and choose Developer Services > CodeArts from the service list.
  3. Click Access Service. The homepage of CodeArts is displayed.
  4. Click Create Project.
  5. Hover over the Scrum card. Click Select to use this template to create a project.
  6. Set Project Name to Scrum01 and retain the default values for other parameters.
  7. Click OK. The Scrum01 project is displayed.
  8. In the navigation pane, choose Artifact > Self-hosted Repos.

Creating a Repository

  1. Enter the self-hosted repo page of the project after completing the operations in Creating a Project and Accessing its Self-Hosted Repos.
  2. Click Create Repository.
  3. Configure the basic information and click Submit.

    • Repository Type: Local Repo and Virtual Repo. Local Repo is selected by default.
    • Repository Name: Enter a repository name.
    • Package Type: Select Maven.
    • Project: The default value is the current project. You can select another target project from the drop-down list box.
    • Include Patterns: (Optional) Configure a path whitelist for the repository.
    • Version Policy: If both of them are selected, the Maven repository generates two types of repositories: Release and Snapshot. Retain the default values.
    • Description: (Optional) Enter up to 200 characters.

  4. The created Maven repository is displayed in the Repository View.

Uploading Maven Artifacts on the Self-Hosted Repo Page

  1. Click the target repository in the left pane after completing the operations in Creating a Repository.
  2. Click Upload on the right of the page.
  3. In the displayed dialog box, set Upload Mode to POM.
  4. In POM, click Select File and upload packages whose name ends with pom.xml or .pom from the localhost.
  5. Click Upload.
  6. In the Repository View, click the name of the uploaded software package to view its details.

Related Tasks

CodeArts Artifact allows you to upload packages either from the page or through CodeArts Build to self-hosted repos. For details, see Building with Maven.