TeamCity 2.1 Help

maven

Maven2 

This page contains reference information about the Maven2 Build Runner fields, and specific information about solving issues with mavenSurefireReporterIssue.

Option

Description

Build runner

Select Maven2 from the combobox.

Goals

In the Goals field, you need to specify the sequence of Maven goals you want TeamCity to execute. Some Maven goals can use version control system, and, thus, they may become incompatible with some VCS checkout modes. If you want TeamCity to execute such goal:

  • when specifying the general VCS settins, select the "Automatically on agent" VCS checkout mode. This makes the version control system available to a goal execution software.

Path to a POM file

Specify path to the POM file relative to the mavenBuildWorkingDirOptionDescription. By default, the property contains pom.xml file. If you leave this field blank, the same value is put in this field. The path may also point to a subfolder, and in this case the <subfolder>/pom.xml is used.

Additional Maven command line parameters

Specify the list of command line prameters Note that -h, -v, -B, -s, -f are ignored.

Artifacts Paths

Specify Basic Concepts as a comma-separated string.

User Settings Path

The path to an alternative user settings file. It is equivalent to Maven's command line option -s or --settings.

JDK Home Path

The path to JDK Home is read from the *JAVA_HOME* environment variable or *JDK home* specified on the build agent if you leave this field empty. If these two values are not specified as well, TeamCity uses JDK home on which the build agent is started. For all run parameters with values specified in terms of other properties (such as, for example, %system.JAVA_1_4%), an implicit requirement is added (ensuring the referenced property is either defined on the agent machine or specified in the build parameters).

JVM Command Line Parameters

Specify JVM command line parameters, for example, maximum heap size or parameters enabling remote debugging. These values are passed by the JVM used to run your build. Example:

-Xmx512m -Xms256m

Build Working Directory

Specify the Basic Concepts. Note that the build working directory correlates with pom.xml file.

Solving the issue with Surefire XML Reporter

Some users complained about incorrect number of tests reported (see http://www.jetbrains.net/jira/browse/TW-586 and http://jira.codehaus.org/browse/SUREFIRE-122). This is caused by a bug in Surefire 2.2 used in Maven 2.0.4 by default. The bug is fixed in Surefire version 2.3.

To use the new plugin version locally for a single project, you need to modify the corresponding POM file. It must contain the following fragment within the project/build/plugins element.

<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.3</version> ... </plugin>

Last modified: 20 April 2023