Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Steps to Configure

SonarQube and SonarScanner


for UI
SonarQube(Server) :
1. Extract SonarQube-6.7.3 package

2. Go to <SonarQube installed_directory>/bin/<windows-x86-64(based on system


arch)>/StartSonar.bat

SonarScanner :
1. Install SonarScanner (URL -
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner)

2. Expand the downloaded file into the directory of your choice. We'll refer to it
as <install_directory> in the next steps.

3. Update the global settings to point to your SonarQube server by


editing <install_directory>/conf/sonar-scanner.properties:

4. Add the <install_directory>/bin directory to your path(env vari).

5. You can verify your installation by opening a new shell and executing the command sonar-
scanner -h (on Windows platform the command is sonar-scanner.bat -h) . You should get
output like this:
usage: sonar-scanner [options]

Options:
-D,--define <arg> Define property
-h,--help Display help information
-v,--version Display version information
-X,--debug Produce execution debug output
6.

Screen clipping taken: 8/13/2018 1:30 PM

7. Run the following command from the project base directory to launch the analysis:

>sonar-scanner

8. Copy the link from the console and paste in browser to navigate to the Sonar Page

9. To add Plugins for scanning Javascript, HTML & CSS files download their jar files sonar-css-plugin ,
sonar-javascript-plugin , sonar-web-plugin

10. Put the downloaded jar files to <SonarQube installed_directory>/extensions/downloads - Restart


the server for the changes to take effect.

You might also like