Maven
The "Maven" Step type allows you to utilize Apache Maven to build projects.
The sequence of space-separated Maven goals.
Allows you to select the required Java version. TeamCity lists a number of standard Java versions typically available on JetBrains-hosted agents.

By choosing any value, you point TeamCity to the required directory where the target Java is installed. For example, if you choose "Default", TeamCity will look in the directory whose path is stored in the env.JAVA_HOME
parameter. Similarly, selecting "JDK 11 ARM64" points TeamCity to the directory stored in the env.JDK_11_0_ARM64
parameter.
If you want to explicitly specify a folder in which TeamCity should look for the required Java, choose "Custom" and enter your custom path.

Note that you can use parameter references instead of absolute values.
The path (relative to the working directory) to the Maven POM file. If this setting is not specified, TeamCity attempts to use the pom.xml
file located directly in the root working folder.
The list of optional command-line parameters. The -q
and -f
parameters are ignored.
JetBrains-hosted TeamCity agents ship with multiple Maven versions. This setting allows you to choose a specific version for this Step.
A typical Maven project often needs to retrieve JAR dependencies from external sources, such as Maven Central, GitHub Package Registry, Azure Artifacts feeds, and others. The Enable Dependency Cache option available in the Optimizations section of Job Settings allows TeamCity to cache dependencies downloaded during the initial pipeline run. Subsequent runs can then reuse these cached dependencies instead of re-downloading them, significantly increasing the speed and cost-efficiency of your pipelines.
See this documentation section for more information: Optimizations: Dependency Cache.
Thanks for your feedback!