Why use SonarQube plugin for Jenkins rather than simply use maven goal sonar:sonar? Why use SonarQube plugin for Jenkins rather than simply use maven goal sonar:sonar? jenkins jenkins

Why use SonarQube plugin for Jenkins rather than simply use maven goal sonar:sonar?


You can of course do a simple mvn sonar:sonar, this will work.

On the other side, there's the SonarQube plugin for Jenkins that will make the configuration easier. For instance you will be able to define information about your SonarQube server (URL, DB user and password) or your multiple SonarQube servers in a single place (the configuration section of Jenkins) so that you don't have to repeat it everywhere.

The plugin also offers the ability to run a SonarQube analysis on the fly (without Maven): you just have to provide some mandatory properties (like sonar.projectKey and sonar.projectVersion for instance) and the plugin will start the Java Standalone Runner transparently for you (this is helpful mostly for other languages than Java which don't rely on Maven for their build).

So if you're just making some tests, you don't really need this plugin. But if you're setting up a production instance of Jenkins, then it's best to use the SonarQube plugin.