Updated on 2024-05-30 GMT+08:00

Operation Guide

Built-in tools such as Maven and JDK are provided. Select a tool version based on the build scenarios.

Maven is used to build a Java project, which has the following functions:

  • You can run mvn package, mvn deploy, or other shell commands for your build.
  • You can use public repositories not provided by CodeArts for your build.
  • You can add other private repositories.
  • Deployment configurations can be automatically added to the pom.xml file. You can run mvn deploy to release private dependencies to self-hosted repos.
  • You can view reports of JUnit testing after the build.

Configuration Description

Add Build with Maven, when configuring build actions.

The parameters are described in the following table.

Parameter

Description

Action Name

Name of a build action. It can be customized.

Tool Version

Select a tool version.

NOTE:

If the preset tool version cannot meet your requirements, you can customize a Docker image, add dependencies and tools required by the project, package the required environment into a Docker image, and push the image to SoftWare Repository for Container (SWR). For details, see Creating Images and Pushing to SWR and Using SWR Public Images.

Commands

Configure Maven commands. You can also use default commands.

setting File Configuration

The setting file is automatically generated with repositories. The optimal repository access mode is automatically configured based on the user's IP address, which may be in regions in or outside China. You are advised to retain the default settings.

You can also add a repository that cannot be found in Huawei Mirrors, self-hosted repos of CodeArts Artifact, or Huawei SDK repositories. For details, see Configuring a Repository.

Release to Self-hosted Repos

By default, CodeArts Build uses the self-hosted repos as the download source of private dependency. The configuration is required for uploading build products to the self-hosted repos and store the build products as dependencies for other projects. For details, see Configuring the Release to Self-hosted Repos.

Unit Test

To process unit test results, set the parameters. For details, see Configuring a Unit Test.

Cache

Opt to use the cache to improve the build speed. If you set Use Dependency Cache to Yes, the downloaded dependency package is cached during each build. In this way, the dependency package does not need to be pulled repeatedly during subsequent builds, which effectively improves the build speed.

NOTE:

After the dependency package built by Maven is stored in the cache, the cache directory is updated only when a new dependency package is introduced to the project built by the tenant. The existing dependency package cache file cannot be updated.