The scanner for Maven automatically collect dependencies, and passes sonar.java.libraries property. When there are no dependencies, the property is empty. SonarJava reads this property and raises a warning when it is empty, considering this is likely a configuration mistake (for people manually providing scanner configuration).
Show the warning only if the parameter is not defined:
sonar.java.libraries= ← correct, no libraries
sonar.java.libraries=foo.jar ← correct, one library
missing ← warning
Add a new property which allows disabling the warning:
sonar.java.libraries= and sonar.java.libraries.empty=true ← correct, no libraries
sonar.java.libraries= or missing ← warning
The first looks better, but many people prepare configuration by copy&paste anti-pattern, and only remove values which they don’t understand. The second is more secure but introduces the new stupid property
In fact, I think MSONAR-170 should probably be closed as “Won’t Fix” or “Duplicate” (ping @Julien_HENRY) now that SONARJAVA-3114 has been created (and solved!) in SonarQube v8.7. It should also be addressed on SonarCloud