'Code coverage published to Sonar is not correct

We're using Sonar Server 9.1 and using maven command to publish reports to Sonar along with code coverage generated through Jacoco

In index.html file generated for code coverage, we can see code coverage as - 68% but used jacoco.xml file to publish to Sonar it's showing only 48.6% code coverages.

What analysis I should do to find the cause of discrepancy?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source