Need better error message for the JaCoCo report task detection

I got several subprojects in the same Gradle project using the unbroken-dome/ gradle-testsets-plugin, several of those subprojects not having certain kinds of tests so I get a lot of these messages:

JaCoCo report task detected, but XML report is not enabled or it was not produced. Coverage for this task will not be reported.

Which task? I get 15 of those lines, but I have only 3 XML reports generated.

I also configured the integrationTest task (coming from the testsets plugin) like this:

task(type: JacocoReport, "jacoco${}Report") {
	description "Generates code coverage report for the ${} task."
	executionData integrationTest
	sourceSets sourceSets.main

With this, I got 1 module setting sonar.coverage.jacoco.xmlReportPaths for the test task, and 2 modules for the integrationTest task. However, the error messages look all the same with no indication on the specifics…

Also it is kind of weird that JaCoCo reports for the integrationTest tasks are actually configured in the context of the test tasks:

  private static void extractTestProperties(Project project, Map<String, Object> properties, boolean addForGroovy) {
    Task testTask = project.getTasks().getByName(JavaPlugin.TEST_TASK_NAME);
    if (testTask instanceof Test) {
      configureTestReports((Test) testTask, properties);
configureJaCoCoCoverageReport((Test) testTask, addForGroovy, project, properties);

I understand that the testTask part is needed only for the backwards compatibility code, but I would appreciate if the coverage integration for my integrationTest tasks would still work in the future.


This feedback doesn’t seem to be about SonarQube analysis, which consumes test reports but does not produce them. You should probably direct this to the JaCoCo or unbroken-dome / gradle-testsets-plugin communities.


Hi, Ann,

The error message comes from this code:

But on that GitHub site, I can’t report issues. Where should I report issues with the Gradle SonarScanner Plugin?

Ah! Okay. This is the place then.