Ipr (deprecated)
This runner provides ability to build IntelliJ IDEA projects in TeamCity.
It is superseded by IntelliJ IDEA Project runner.
This page contains reference information about the IPR build runner fields.
Ipr Runner Deprecation
Since TeamCity 6.0 Ipr runner is deprecated in favor of IntelliJ IDEA project runner which uses another implementation approach. In one of the following major TeamCity releases all build configurations with Ipr runner will be automatically converted to IntelliJ IDEA project runner. Since the runners may function differently in specific configurations it is highly recommended to change your current Ipr runner-based configurations to the new runner and check your settings before the final Ipr runner disabling. Please also use the IntelliJ IDEA project runner for all newly created projects and let us know if you have any issues with it.
Apart from differences in the scope of supported IntelliJ IDEA project features, the runners are also different in approach to tests running and coverage.
Namely:
EMMA coverage is not supported by IntelliJ IDEA project runner. We recommend migrating to IntelliJ IDEA coverage engine if you used EMMA
in IntelliJ IDEA project runner JUnit tests are launched via IntelliJ IDEA shared run configurations as opposed to Ant's
<junit>
task in Ipr runner.
Here are the recommended steps to perform the migration from Ipr to IntelliJ IDEA project runner:
If your existing Ipr runner has JUnit Test Runner Settings configured, backup all the settings of the section, for example, into a text file.
If you have code coverage settings configured, save these settings also. (See also related issue)
Change the runner type to IntelliJ IDEA Project. All your settings will be migrated except for JUnit and code coverage options.
To restore JUnit tests you will need to create a shared run configuration in IntelliJ IDEA and commit the corresponding file into the version control. The name of the run configuration can then be specified in the Run configurations to execute area.
For coverage, configure code coverage options anew using your saved settings.
IntelliJ IDEA Project Settings
Option | Description |
---|---|
Path to the project | Use this field to specify the path to the project file ( The path should be relative to the checkout directory. |
Detect global libraries and module-based JDK in the | 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 |
---|---|
| 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 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 |
Additional Pre/Post Processing (Ant)
Option | Description |
---|---|
Run before build | In the appropriate fields, enter the Ant scripts and targets (optional) that you want to run prior to starting the build. The path to the Ant file should be relative to the project root directory. |
Run after build | In the appropriate fields, enter the Ant scripts and targets (optional) that you want to run after the build is completed. The path to the Ant file should be relative to the project root directory. |
JUnit Test Runner Settings
Option | Description |
---|---|
Test patterns | Click the Type test patterns link, and specify the required test patterns in a text area. [-]moduleName:[testFileNamePattern]
where:
*test:**/*Test.java
-*:**/ui/**/*.java
|
Search for tests | In IDEA project, a user can mark a source code directory as either
|
Classpath in Tests | By default the whole classpath is composed of all classpaths of the modules used to get tests from. The following two options define whether you will use the default classpath, or take it from the specified module. |
Override classpath in tests | If this option is checked, you can define test classpath from a single, explicitly specified module. |
Module name to use JDK and classpath from | If the option Override classpath in tests is checked, you have to specify the module, where the classpath to be used for tests is specified. |
JUnit Fork mode | Select the desired fork mode from the combo box:
|
New classloader instance for each test | Check this option, if you want a new classloader to be instantiated for each test case. This option is available only if Do not fork option is selected. |
Include Ant runtime | Check this option to add Ant classes, required to run JUnit tests. This option is available if fork mode is enabled (Fork per test or Fork once). |
JVM executable | Specify the command that will be used to invoke JVM. This option is available if fork mode is enabled (Fork per test or Fork once). |
Stop build on error | Check this option, if you want the build to stop if an error occurs during test run. |
JVM command line parameters for JUnit | Specify JVM parameters to be passed to JUnit task. |
Tests working directory | Specify the path to the working directory for tests. |
Tests timeout | Specify the lapse of time in milliseconds, after which test will be canceled. This value is ignored, if Do not fork option is selected. |
Reduce test failure feedback time | Use following two options to instruct TeamCity to run some tests before others. |
Run recently failed tests first | If checked, in the first place TeamCity will run tests failed in previous finished or running builds as well as tests having high failure rate (a so called blinking tests) |
Run new and modified tests first | If checked, before any other test, TeamCity will run tests added or modified in change lists included in the running build. |
Verbose Ant | Check this option, if the generated JUnit task has to produce verbose output in ant terms. |
Code Coverage
To learn about configuring code coverage options, refer to the Configuring Java Code Coverage page.