You need to enable JavaScript to run this app.
Container Registry

Container Registry

Copy page
Download PDF
Uploading packages
Upload packages (command line)
Copy page
Download PDF
Upload packages (command line)
Uploading packages is one of the basic features of the artifact repository. You can upload completed packages to the artifact repository for others to download easily. This section explains how to use the command line to upload local packages to the artifact repository.​
Prerequisites​
  • Have registered a Volcano Engine root user and activated the artifact repository Service.​
  • A repository instance has been created. For details, refer to Creating basic edition instances.​
  • An artifact repository has been created. For details, please refer to Creating Maven repositories.​
Procedure​
Method one: Directly upload a JAR file​
Simply execute the following command to upload the 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>​
​
Parameter​
Description​
path-to-jar-file​
The file path of the JAR package to be uploaded in the local environment.​
group-id​
The project ID to which the custom package belongs, facilitating subsequent filtering.​
artifact-id​
The name of the custom package.​
version​
The version number of the custom package.​
repository-id​
It is essential to fill in the REPOSITORY_ID parameter that has been configured in settings.xml. The local environment obtains the access credential information from the settings.xml file using REPOSITORY_ID to access the target artifact repository. For instructions on querying REPOSITORY_ID, please refer to the FAQ at the end of this document.​
repository-url​
Configure the access URL address of the artifact repository. This can be obtained from the artifact repository details. For details, please refer to Managing Repository.​
​
Method 2: Upload the JAR package via Maven configuration​
  1. Copy and add the following configuration to the pom.xml file.​
warning​
Ensure that the repository id configuration in the pom.xml file matches that in the settings.xml file. Otherwise, it will not take effect.​
  • ​
    <distributionManagement>​
    <repository>​
    <id>REPOSITORY_ID1</id>​
    <url>REPOSITORY_URL1</url>​
    </repository>​
    <snapshotRepository>​
    <id>REPOSITORY_ID2</id>​
    <url>REPOSITORY_URL2</url>​
    </snapshotRepository>​
    </distributionManagement>​
    ​
  • ​
    Parameter​
    Description​
    REPOSITORY_ID​
    It is essential to fill in the REPOSITORY_ID parameter that has been configured in settings.xml. The local environment obtains the access credential information from the settings.xml file using REPOSITORY_ID to access the target artifact repository. For instructions on querying REPOSITORY_ID, please refer to the FAQ at the end of this document.​
    REPOSITORY_URL​
    Configure the access URL address of the artifact repository. This can be obtained from the artifact repository details. For details, please refer to Managing Repository.​
    ​
  1. Execute the following command to push the package to the artifact repository.​
  • ​
    mvn deploy​
    ​
FAQ​
How do I view the REPOSITORY_ID in the settings.xml file??​
  1. Log in to the command-line interface of your local environment.​
  1. Execute the following command to navigate to the Maven folder.​
​
sudo cd ~/.m2​
​
  1. View the repository ID in the settings.xml file, as shown in the example below.​
  • ​alt​​
​
Last updated: 2025.10.24 11:20:39