Hi
when using SonarQube 7.6, I get this warning when analyzing a multimodule project with Maven
[WARNING] Specifying issue exclusions at module level is not supported anymore. Configure the property ‘sonar.issue.ignore.multicriteria’ and any other issue exclusions at project level.
In my parent pom I have something like that
<sonar.issue.ignore.multicriteria>e11,e12</sonar.issue.ignore.multicriteria>
<sonar.issue.ignore.multicriteria.e11.ruleKey>squid:S00112</sonar.issue.ignore.multicriteria.e11.ruleKey
<sonar.issue.ignore.multicriteria.e11.resourceKey>**/SomeClass.java</sonar.issue.ignore.multicriteria.e11.resourceKey>
… similar for e12
I do not understand how to avoid the warning… how should I specify the multicriteria at project level?
You need to re-specify this at the project level with the path through the file system to what should be ignored. As a side note, you seem to have worked out how to do this outside the UI, but it’s easier to manage in the UI.
Actually I don’t want to use the UI since I want my Maven project to be configured so that when I switch to another Sonarqube installation (and Sonarcloud is just one of them) I don’t have to reconfigure anything.
I’m not sure I understand your solution… how should I modify this line in the POM? should I specify some relative path?
I’d want this configuration in the parent POM (as it is now) so that it applies to paths in all the Maven modules.
In Maven properties are inherited, so all modules will have this configuration. But the warning should only be displayed when:
we detect presence of such properties at module level
and the value of those properties is different than the parent (to ignore inheritance)
I don’t really know what is going wrong in your case, maybe your parent pom is not the parent in SQ (flat Maven layout maybe?).
I could investigate if you share a small reproducer, or alternatively you can also generate the scanner properties dump by running the same command as usual (like mvn sonar:sonar) with -Dsonar.scanner.dumpToFile=conf.properties.
Then open the generated file and remove any sensitive data (like all sonar.login/sonar.password) and please send it to me privately.
I specify multicriteria only in the parent POM (which is also the project in SonarQube and it does not rely on flat layout - though I’d expect flat layout not to be a problem, hopefully). I recreated the problem with a small project with a few modules. It consists of Eclipse plugin projects, build with Maven Tycho, but in the end, the POM is a Maven POM.
This issue has now been completed/closed, but this is still an issue in SonarQube 9.3.0.51899. I have a SINGLE .NET project (no solution), and am getting the following warning: