TeamCity Cloud 2024.03 Help

IntelliJ IDEA Project

The IntelliJ IDEA Project build runner allows you to build a project created in IntelliJ IDEA.

Supported IntelliJ IDEA features

TeamCity IntelliJ IDEA runner supports the subset of IntelliJ IDEA features:

Feature

Status

Notes, limitations

Java

plus.png

Runner is able to compile Java projects

JUnit 3.x/4.x

plus.png, with limitations

  • Test runner parameters are not supported

  • running Maven before tests start is not supported

  • alternative JRE is not supported

TestNG

plus.png, with limitations

  • Test runner parameters are not supported

  • running Maven before tests start is not supported

  • running of the tests from group is not supported

  • alternative JRE is not supported

Application run configuration

plus.png, with limitations

  • running Maven before tests start is not supported

  • alternative JRE is not supported

J2EE integration

plus.png

Runner is able to produce WAR and EAR archives with necessary descriptors

JPA

plus.png

Runner adds necessary descriptors in produced artifacts

GWT

plus.png

Runner can invoke GWT compiler and add compiler result to artifacts

Groovy

plus.png, with limitations

Runner is able to compile projects with Groovy code and run tests written in Groovy, Groovy script run configurations are not supported

Android

plus.png

Flex

minus.png

Coverage

minus.png, if specified in run configurations

IntelliJ IDEA based coverage can be configured separately on the runner settings page

Profiling plugins

minus.png

IntelliJ IDEA Project Settings

Option

Description

Path to the project

Use this field to specify the path to the project file (.ipr) or path to the project directory (root directory of the project that contains .idea directory). This information is required by this build runner to understand the structure of the project.

The path should be relative to the checkout directory.

Detect global libraries and module-based JDK in the *.iml files

If this option is checked, all the module files will be automatically scanned for references to the global libraries and module JDKs when saved. This helps you ensure all references will be properly resolved.

Check/Reparse Project

Click to reparse the project and import build settings right from the IDEA project, for example the list of JDKs.

Working directory

Enter a path to a Build Working Directory, if it differs from the Build Checkout Directory.

Optional, specify if differs from the checkout directory.

Unresolved Project Modules and Path Variables

This section is displayed, when an IntelliJ IDEA module file (.iml) referenced from IPR-file:

  • cannot be found

  • allows you to enter the values of path variables used in the IPR-file

To refresh values in this section click Check/Reparse Project.

Option

Description

<path_variable_name>

This field appears, if the project file contains path macros, defined in the Path Variables dialog of IntelliJ IDEA's Settings dialog. In the Set value to field, specify a path to project resources, to be used on different build agents.

Project JDKs

This section provides the list of JDKs detected in the project.

Option

Description

JDK Home

Use this field to specify JDK home for the project.

JDK Jar File Patterns

Click this link to open a text area, where you can define templates for the .jar files of the project JDK. Use Ant rules to define the .jar file patterns.
The default value is used for Linux and Windows operating systems:

jre/lib/*.jar

For macOS, use the following lines:

lib/*.jar ../Classes/*.jar

IDEA Home

If your project uses the IDEA JDK, specify the location of IDEA home directory

IDEA Jar Files Patterns

Click this link to open a text area, where you can define templates for the .jar files of the IDEA JDK.

Java Parameters

Option

Description

JDK

Select a JDK. This section details the available options. The default is JAVA_HOME environment variable or the agent's own Java.

JDK home path

The option is available when <Custom> is selected above. Use this field to specify the path to your custom JDK used to run the build. If the field is left blank, the path to JDK Home is read either from the JAVA_HOME environment variable on the agent machine, or from the env.JAVA_HOME property specified in the build agent configuration file (buildAgent.properties). If these values are not specified, TeamCity uses the Java home of the build agent process itself.

JVM command line parameters

Additional JVM command line parameters allow you to set initial and maximum heap sizes, enable additional logging, select the required bytecode verifier mode, and more.

You can specify both standard (begin with -, for instance -verbose:[class|module|gc|jni] or --dry-run) and non-standard (begin with -X, for instance -Xmx<size> or -XstartOnFirstThread) JVM options.

To specify multiple command line parameters, use space as a separator. For example:

-verbose:gc -Xdiag -Xcomp -Xmx512m -Xms256m

Compilation settings

Option

Description

Only compile classes required to build artifacts and execute run configurations

Select whether to compile all classes in the project or only those classes which are required by run configurations or for building artifacts.

Artifacts

Option

Description

Artifacts to Build

Specify here names of the artifacts to be built that are configured in the IntelliJ IDEA project.

Run configurations

Option

Description

Run configurations to execute

Specify here names of IntelliJ IDEA run configurations configured in the project to execute inside TeamCity build. Supported configuration types are: JUnit, TestNG, and Application. Note that run configurations specified here should be shared (via "Share" checkbox in IntelliJ IDEA Run/Debug Configurations dialog) and checked in to the version control.

Ant and Build Artifacts tasks specified in the Before launch list of IDEA run configurations are supported.

Test Parameters

  • To learn more about Run recently failed tests first and Run new and modified tests first options, refer to the Running Risk Group Tests First page.

  • The Run affected tests only (dependency based) option will take build changes into account. With this option enabled runner will compute modules affected by current build changes and will execute only those run configurations which depend on affected modules directly or indirectly.

Code Coverage

Specify code coverage options, for the details, refer to IntelliJ IDEA Code Coverage page.

Last modified: 07 September 2023