What do Attributes of Maven plugins mean (jacoco:report-aggregate)

Viewed 22

Example 1: jacoco:report-aggregate says:

Attributes:
* Requires a Maven project to be executed.

I've stumbled trying to use the "report-aggregate" goal, as it works only if unit tests are executed by the same command as JaCoCo plugin itself; in other words, if I use command-line to run unit tests from module A, then I execute another command to run unit tests from module B, then I execute yet another command in special module C (created just to run jacoco aggregation) to trigger jacoco:report-aggregate - it won't work, JaCoCo will generate an empty aggregated report. In another case, it won't be empty, but the aggregated coverage will be 0%. It works only if unit test are executed by same command.

Thus the question, what exactly does "Requires a Maven project to be executed" mean? (The described behavior is probably just a peculiarity of jacoco, but still I would never write the word sequence "Requires a Maven project to be executed" -- a project is a project, it can be code or it can be a declaration, it is not a command, thus it cannot be executed - plain non-sense to me)

0 Answers
Related