Sonarqube Scanner, as a code scanning tool, through which the code of the project is read and sent to the Sonarqube server to allow Sonarqube code analysis.
It can be considered that Sonarqube scanner is the client of Sonarqube.
Sonarqube scanner is easy to integrate with different types of build tools and Maven project consolidation
A plug-in for the Sonarqube Scanner tool is available in the Maven repository as long as the following configuration is added to the setting.conf file
<settings>
<pluginGroups>
<plugingroup>org.sonarsource.scanner.maven</plugingroup >
</pluginGroups>
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
< Properties>
<!--Optional URL to server. Default value is http://localhost:9000-->
<sonar.host.url>
http://myserver:9000
</ sonar.host.url>
</properties>
</profile>
</profiles>
</settings >
After the configuration is complete, in the project, the execution MVN Sonar:sonar,sonarqube scanner automatically scans, according to the Pom.xml file to obtain the project related information, does not need the custom sonar-project.properties. Once the scan is complete, it will be uploaded to the Sonarqube server only. Later, the results of the analysis can be seen on the landing server. integration with Jenkins Building system
If the project you are building is the MAVEN standard project, you can press # #与Maven项目整合这种方式进行.