I’m having trouble getting pull request code coverage analysis to work on particular Maven project. The long-lived branch will display test coverage analysis, but the pull requests will not.
From within the module directory, I generate the exec files:
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent test -DskipTests=false -Dgroups=small
And confirmed that the files are generated.
I then run the sonar analysis step:
mvn sonar:sonar -Dsonar.projectKey=<project-key> -Dsonar.verbose=true -Dsonar.host.url=https://sonarcloud.io -Dsonar.pullrequest.branch=alwyn-test-pr-2 -Dsonar.pullrequest.base=release-alwyn -Dsonar.pullrequest.key=1602 -Dsonar.login=<key>
However, I’ve tried the same steps against a test repository and am able to get PR test coverage to display.
The only difference I’ve been able to find between the working and non-working repos is that the non-working repo outputs:
[WARNING] File '/Development/app/java/common/src/main/java/com/blah/util/FakeUtil.java' was detected as changed but without having changed lines
The above warning seems incorrect given that this a new file that I’ve added in the PR.