sonar.cpd.exclusions will prevent duplication from being calculated, but won’t prevent rules in your Quality Profile from triggering. Preventing a specific rule from triggering on a file path pattern is more in the scope of Ignore Issues on Multiple Criteria on the same settings page.
In fact, what you probably want to do is make sure sonar.tests is configured correctly (this would be done as an analysis parameter on the command line or in a sonar-project.properties file). This will make sure that the rules only run on your Main (source) code. Check the documentation on Analysis Scope.