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
… similar for e12
I do not understand how to avoid the warning… how should I specify the multicriteria at project level?
thanks in advance
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.
Thank you Ann for your answer.
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.
thanks in advance
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
Then open the generated file and remove any sensitive data (like all
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.
The project can be found here (only an example with no real code/tests that make sense): https://github.com/LorenzoBettini/tycho-sonarqube-example
I tested it locally and from Travis/SonarCloud: https://sonarcloud.io/dashboard?id=example%3Aexample.parent
I’ve also tried your command locally and the generated conf.properties contain lines of the shape (concerning multicriteria):
In the parent POM I specify
Do you still need the whole conf.properties?
many thanks in advance
Thanks for the reproducer. I have created a ticket and we will work on a fix:
Thanks again for reporting the issue.
Please let me know if I can further help
This issue has now been completed/closed, but this is still an issue in SonarQube 22.214.171.124899. I have a SINGLE .NET project (no solution), and am getting the following warning:
Context: Example of c# Azure Devops pipeline that suppress rules