You may then use any of the SonarQube Scanners to perform the analysis, such as Maven, Gradle, Ant, etc. An example using maven:
Analyzing with SonarQube Scanner for MSBuild
Go to the Build section, click on Add build step and choose Invoke Standalone SonarQube Analysis:Scanner.
Configure the SonarQube analysis. You can either point to an existing sonar-project.properties file or set the analysis properties directly in the Project Analysis properties field:
Analyzing with SonarQube Scanner for Maven
Once the environment variables are available, use them in a standard Maven build step :
by setting the Goals to include
|The Post-build Action for Maven analysis is still available, but is deprecated.|