Sonarqube does not regard cpd exclusion from PR analysis

We are using sonarqube enterprise edition (

The analysis of one PR is breaking quality gate since code duplication.

However, developers are trying to exclude those paths from code duplication analysis by using gradle command:

property 'sonar.cpd.exclusions', "**/main/java/de/YYY/ZZZ/XXX/api/gateway/models/**/*"

this does not result in success, so we put following path also into project analysis scope and global analysis scope, also without success.


Can you help us out what we are doing wrong or if it is a bug?


Hi Andrzej,

Welcome to the community!

Have you tried doing this through the UI? (Note that it includes the correct parameter key for each setting. :wink:)