Sonar scanner is not scanning the JAVA custom rules

I created a new Java custom plug. I created a profile as well. I can see all those rules in SonarQube. When I am running “sonar-scanner”, I am not able to issue reports against those plugins. But When I am running “mvn clean install sonar:sonar”, it is showing an issue against those plugins in sonarQube.

In Sonar-scanner properties, I have set the below parameters: Can you please let me know why Sonar-Scanner is not scanning those custom java rules?


Please let me know if u need more details.

Versions are given below:

SonarQube :
Scanner :
Plugin : Created new custom Java plugin
Java 11.0.3 AdoptOpenJDK (64-bit)
Windows 10 10.0 amd64

Pragati Jain.


Welcome to the community!

I guess you’re testing with both scanners in the name of thoroughness (:clap:) but the difference you’re seeing is going to be down to the parameters the scanner is getting, and not how your custom rules work. If they work from one scanner they’ll work from all the others (when properly configured).

If you really want to track this down, the thing to do is add -Dsonar.scanner.dumpToFile=[path to file] to the command line of each analysis and then compare the output.


Thanks a lot for your reply. It started working. were missing in sonar-scanner property file. Your suggestion worked. I compared both the dump file and got to know this. Thanks a lot for unblocking me.