Since sonar.sources defaults to pom.xml,src/main/java – if other directories are already being analyzed (like src\main\webapp), I suspect that somewhere you are defining sonar.sources to include those other directories and need to include the new one as well.
Thanks for the feedback @anon67236913. I’ll try and find the best folks to answer why we target src/main/java instead of src/main, and whether or not it’s reasonable to expand the scope.
Thanks for your message. I think that happened when a scanner for maven was implemented, the idea was to use it just for Java projects. Now it makes more sense to be able to scan other projects too. So here is a ticket to improve it: