Let's say I have a project with 2 modules, and 3 pom.xml files (1 for Module A, 1 for Module B, 1 parent pom.xml)
I've added the following plugin that verifies the code coverage diff between my changeset and another branch, and fails if it's below a certain threshold https://github.com/SurpSG/diff-coverage-maven-plugin
If I make NO code changes:
mvn clean verify
-> success
mvn clean verify -T 1C -pl moduleA -am -U
-> success
mvn clean verify -T 1C -pl moduleA, moduleB -am -U
-> success
So as expected, my builds are passing because I made no code change.
Now if I make a code change to moduleA without proper unit test code coverage, here are the results.
mvn clean verify -T 1C -pl moduleA -am -U
-> fail for moduleB, skipping moduleA
mvn clean verify -T 1C -pl moduleB -am -U
-> success
mvn clean verify -T 1C -pl moduleA, moduleB -am -U
-> fail for moduleB, skipping moduleA
This last case is what is puzzling me, why would moduleB be failing? why is it not running for each module without side-effects?
The issue is that the failure message is really not helpful and pointing to the wrong service.