Help Center/ CodeArts Artifact/ Best Practices/ Migrating Local Repository Data to CodeArts Artifact/ Migrating Local Maven Repository Data to CodeArts Artifact
Updated on 2025-07-22 GMT+08:00

Migrating Local Maven Repository Data to CodeArts Artifact

Step 1: Obtain Target Maven Repository Information from CodeArts Artifact

  1. Log in to the CodeArts homepage and click a card to access a project.
  2. In the navigation pane, choose Artifact > Self-hosted Repos.
  3. In the left pane, click the target Maven repository name to go to its details page, and view the Repository Path.
  4. Click next to the repository URL to copy it.
  5. Click Tutorial in the upper right corner of the page. In the displayed dialog box, click Download Configuration File to download the settings.xml file to the localhost.

    Open the file on the localhost and find the username and password.

Step 2: Configure Migration Tool

  1. Go to the self-hosted repo page and select the target Maven repository in the left pane.
  2. Click the repository name. In the upper right corner of the page, click and select Download Migration Tool to download the MigrateTool.zip package to the localhost. Then decompress it to obtain uploadArtifact.py (migration tool) and artifact.conf (configuration file).
  3. Configure the  artifact.conf  file using the example below. Only the required parameters are listed. Other parameters can be deleted.

    artifact
    packageType = Component type. Set it to Maven.
    userInfo = username:password (username and password obtained in 5)
    repoRelease = Repository URL (repository URL obtained in 4)
    repoSnapshot = Repository URL (repository URL obtained in 4). This parameter is involved when the Maven artifact type is Snapshot.
    srcDir = Directory path of the local Maven repository to be migrated. The value is user-defined, for example, C:\Users\xxxxxx\repository.

Step 3: Migrate Data

Run the migration tool obtained in 2 by executing this command:

python uploadArtifact.py

Step 4: Verify Migration Results

Go to the target Maven repository in self-hosted repos and verify whether the local Maven repository data was uploaded successfully.

If the migration fails, try again or contact customer service.