Using BuildProblemData

We have a plugin that uses some of the BuildProblemData public static constants like so:

if (build.hasBuildProblemOfType(BuildProblemData.TC_COMPILATION_ERROR_TYPE)) {

We had previously been importing the runtime-util jar from the TC 7 installation, but with the TC 8 upgrade, we have been attempting to use the new Maven repository. I don't see the runtime-util jar in this repository, but common-api.jar does have the BuildProblemData class in it. However, the constants don't appear to be publicly accessible in this jar, leading to compilation failures when we try to compile code containing references like the above snippet. What is the best way for us to successfully use the BuildProblemData constants?


Hello, Stephen,

Since 8.0 the mentioned constant is no longer a part of TeamCIty OpenAPI, to find out if a build has compile errors you may use the following code:

import jetbrains.buildServer.serverSide;

public boolean buildHasCompileErrors(SBuild build) {
  final BuildStatistics statistics = build.getBuildStatistics(new BuildStatisticsOptions(COMPILATION_ERRORS, 0));
  return !statistics.getCompilationErrorBlocks().isEmpty();


I see how to check for compilation failures using that method, but is it no longer possible to check for other failure types? For example, failure because of tests, failure because of exit code, failure because of out of memory exception, failure because of execution timeout, etc.



The contants were moved outside from open API to avoid plugin writers from reporting such problems - problems of these types are normally reported only by TeamCity and plugins should report their own types.

As a temporaty solution you may directly use string constants ("TC_EXIT_CODE", "TC_COMPILATION_ERROR", "TC_FAILED_TESTS", "TC_ERROR_MESSAGE", "TC_EXECUTION_TIMEOUT", "TC_JVM_CRASH", "TC_OOME", "TC_USER_PROVIDED").
We will return them back to BuildProblemData in TeamCIty 8.0.2 which will be released soon.


8.0.2 has been released, but the Maven repository doesn't seem to have been updated with the new 8.0.2 libraries. Should I file a ticket for this?


Stephen, we've uploaded 8.0.2 libs to Maven repo, please check it out


Please sign in to leave a comment.