When to use sonar-scanner CLI versus SonarScanner plugin available with build tool’s like Maven,Gradle. etctera..?

Hi Yeshwanth,

Welcome to the SonarSource Community!

You should always use the Maven/Gradle/Ant scanner for Java analysis (assuming you are using one of those build technologies) as it makes configuration much easier and access to corresponding binaries and dependent libraries is required. Using the CLI scanner, you’ll need to configure a lot of parameters that are already known as part of the Maven/Gradle/Ant build.

Note that you must use the Scanner for MSBuild if you are analyzing .NET projects.

Brian