Question around

Hi Community

We are running a developer version of SonarQube. Im running a maven scanner via Jenkins
What Im trying to figure out (and I dont think its possible), is that I have parameters at the command like


But what I didnt want to do was congest my Jenkins file with all the -Dsonar.coverage.exclusions=
lines to make it a little neater.

So, I thought if I just create a file and have all those lines in there
-Dsonar.coverage.exclusions=src/main/java/com/, src/main/java/com/mytests/**/
etc, the scanner would kinda take them in. But I get the feeling the sonar-projects file needs the project key and a bunch of required parameters as well if you want to use it.

Hope this makes sense. I was looking at using groovy code to just import the -Dsonar.coverage.exclusions=src/main/java/com/* from a file and add it that way to make the jenkins file a little cleaner

If you’re using the maven scanner, a file is a no-go. However, you can add details to your pom.xml

  <sonar.coverage.exclusions> [...] </sonar.coverage.exclusions>