- Documentation
Container Registry
Artifact repository AR
Getting started
Upload and download Maven-format packages
Getting started
Upload and download Maven-format packages
Upload and download Maven-format packages
The artifact repository supports hosting artifacts, allowing users to create artifact repositories and upload and download artifacts. This article introduces how to quickly use the artifact repository to upload and download Maven artifacts.
Prerequisites
- To enable IAM users to operate the artifact repository, ensure that the relevant policy and role authorization for the artifact repository have been completed. For detailed operating instructions, refer to Permissions Management.
- Maven has been installed in the local environment.
Procedure
Step 1: Create an instance
- In the left navigation bar, click Instances. Then, in the Instances area on the right page, click Create a Basic Edition Instance.
- Configure the instance parameters.
- Click Confirm to navigate to the Confirm Order interface.
- After confirming the configuration details, billing type, purchase quantity, and price in the order, if there are no issues, check the box for I have read and agreed to the "Service Terms for the Basic Edition of Artifact Repository".
- Click confirm and wait for the system to complete instance creation.
Step 2: Create a repository
- In the left navigation bar, select Instances. In the Instances area on the right page, click to enter the artifact repository instance.
- At the top of the left navigation bar, select the Maven package format, and then in the menu bar, choose Repository Management and click on New Repository to enter the repository configuration page.
- Configure the parameters of the artifact repository.
Step 3: Configure repository credentials
- In the dropdown menu at the top of the left navigation bar, select the Maven package format, and in the menu bar, select registry management.
- In the repository management list, click Set permanent credential. Credentials for the artifact repository can now be configured.
- Please copy the access credentials and add them to the local settings.xml file. <username> and <password> are the username and password for your artifact repository.
tip
In most cases, you can find the settings.xml file in the ~/.m2 directory.
Step 4: Upload package
mvn deploy:deploy-file -Dfile=<path-to-jar-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=jar -DrepositoryId=<repository-id> -Durl=<repository-url>
Step 5: Download packages
- Copy and add the following configuration to the settings.xml file.
- Copy and add the following configuration to the pom.xml file.
- Execute the following command to package and download packages.
View results
- After executing the packaging command, the system automatically packages and downloads. When 'BUILD SUCCESS' is displayed in the command line, it indicates that the package has been downloaded successfully.
-
- Simply enter the Target folder to view the downloaded package.
-
Last updated: 2025.10.24 11:20:36