Help Center/ CodeArts Build/ User Guide (Ally Region)/ FAQs/ Using Maven for Build/ Why Is My Download of Maven Components Slow?
Updated on 2026-01-08 GMT+08:00

Why Is My Download of Maven Components Slow?

Symptoms

Maven components are downloaded slowly during the build process.

Cause Analysis

The Maven build action generates a default settings file with a public network address for the mirror of a Maven repository. This can cause some Maven components to be downloaded from the public network. When public network access times out, the components are then downloaded from the private repository. As a result, downloading all Maven components may take a long time.

Solution

(Recommended) Method 1:
  1. Upload the modified settings.xml file to the root directory of the code repository. For details, see Customizing the settings.xml File.
  2. In the build task list, click the name of the target build task.
  3. Click Edit. In the Commands window of the Build with Maven action, add --settings settings.xml to use the added settings.xml file for the Maven build.

Method 2:
  1. In the build task list, click the name of the target build task.
  2. Click Edit and add a Download File from File Manager action before the Build with Maven action.
  3. Click Upload to upload the custom settings.xml file. Leave the other parameters as default. For details about how to customize the settings.xml file, see Customizing the settings.xml File.
  4. In the Commands window of the Build with Maven action, add --settings settings.xml to use the added settings.xml file for the Maven build.

Customizing the settings.xml File

  1. In the Commands window of the Build with Maven action, run the cat /home/build/.m2/settings.xml command. After the task is complete, the content of the settings.xml file will be displayed in the build logs.
  2. Use the displayed configuration of the existing settings.xml file as a reference to create a custom settings.xml file.