Code duplication exclusion ignored in Sonarqube 8.9.8

I have following configuration to exclude code duplication from my entities java files in my sonar properties.

sonar.coverage.exclusions=**/database/**/*.java
sonar.cpd.exclusions=**/database/entity/*.java

In the debug information in my jenkins log, it seems to be ok:

11:43:18.045 INFO:   Excluded sources for coverage: **/database/**/*.java
11:43:18.045 INFO:   Excluded sources for duplication: **/database/entity/*.java
 ...
11:43:18.409 DEBUG: 'src/main/java/com/swisscom/oce/employeeoverview/database/entity/HRUnitNameDao.java' indexed with language 'java'
11:43:18.409 DEBUG: File src/main/java/com/swisscom/oce/employeeoverview/database/entity/HRUnitNameDao.java excluded for coverage
11:43:18.409 DEBUG: File src/main/java/com/swisscom/oce/employeeoverview/database/entity/HRUnitNameDao.java excluded for duplication
11:43:18.409 DEBUG: 'src/main/java/com/swisscom/oce/employeeoverview/database/entity/HRTeamNameDao.java' indexed with language 'java'
11:43:18.409 DEBUG: File src/main/java/com/swisscom/oce/employeeoverview/database/entity/HRTeamNameDao.java excluded for coverage
11:43:18.409 DEBUG: File src/main/java/com/swisscom/oce/employeeoverview/database/entity/HRTeamNameDao.java excluded for duplication

But it seems to be an issue in the dashboard:

How is it possible?

Hi,

Welcome to the community!

The exclusions you’ve set control whether the files are included in the calculation of coverage and duplication metric values (i.e. measures).

The screenshot you’re showing is of issues, which is an entirely different thing. For that, you can set an issues exclusion or simply remove the relevant rule from your profile.

 
HTH,
Ann