Jacoco-report-aggregation odd error

Once I resolved the issue described here: Jacoco-report-aggregation with custom maven repository (in my case I needed to apply my own conventions plugin - I didn’t expect that to be needed because the tests have already run so I didn’t think dependencies would be needed by the aggregating project)

I then had a problem that the plugin seems to be trying to parse one of my jar files :man_shrugging:

Task ':aggregate:testCodeCoverageReport' is not up-to-date because:
  Task has failed previously.
[ant:jacocoReport] Loading execution data file /Users/mybuild/backend/api-v1/build/jacoco/test.exec
[ant:jacocoReport] Loading execution data file /Users/mybuild/backend/api-v2/build/jacoco/test.exec
[ant:jacocoReport] Loading execution data file /Users/mybuild/backend/engines/build/jacoco/test.exec
[ant:jacocoReport] Loading execution data file /Users/mybuild/backend/shared/build/jacoco/test.exec
[ant:jacocoReport] Loading execution data file /Users/mybuild/backend/shared/build/libs/shared-0.0.1-SNAPSHOT-tests.jar
:aggregate:testCodeCoverageReport (Thread[Execution worker for ':' Thread 11,5,main]) completed. Took 1.858 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':aggregate:testCodeCoverageReport'.
> Unable to read execution data file /Users/mybuild/backend/shared/build/libs/shared-0.0.1-SNAPSHOT-tests.jar

I see from the source code of the plugin that it uses files generated by any task from JacocoTaskExtension. I have no idea why this JAR would be included. The code for creating it is like this:

tasks.register('testsJar', Jar) {
    archiveClassifier = 'tests'
    from(sourceSets.test.output)
}

configurations {
    testArtifacts
}

artifacts {
    testArtifacts testsJar
}

publishing.publications.maven.artifact(testsJar)

Can you please post a link to a full reproducer? I’m wondering how this could happen and was looking to recreate the issue, but not having any success so far.