Java maven scanner does ignores everything but java

Hi,
I’m using SQ: v10.8.1 Developer and have many Java projects however in every repo there is more than just the java code e.g. Dockerfile, helm charts. SQ supports analyzing them but only when we run the analysis with the sonar-scanner cli however the recommendation is to use the maven plugin.

There is a observable difference in the results between the generic scanner and the maven plugin but at the same time the maven scanner ignores everything apart from java. Also the generic scanner is hard to scale granted I have to specify sonar.java.* args that could different from repo to repo but at the same time it is not scalable to do it everywhere.

  • Is there any other way to run the maven-scanner AND activate analysis for other “languages” (Docker, K8s) at the same time?
  • Are there plans to add support to the maven plugin to detect other scanners as well, for example the “JavaScript/TypeScript/CSS” does that and it works well.

it feels like SQ can do so much but not for java projects.

Regards

Hi,

I’m so glad you asked. :smiley:

We somewhat recently added the sonar.maven.scanAll property. Set it to true and you’ll pick up the other languages.

 
HTH,
Ann

Hi Ann,
sounds great! I`ll give it a try and come back to you.

Regards.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.