1. Download Sonar Qube (ex: sonarqube-6.7)
  2. Download Sonar Scanner (ex: sonar-scanner-cli-3.0.3.778-windows)
  3. Set Java path for sonar qube by setting Java path in wrapper.java.command  property in the <SonarQube_Path>\config\wrapper.conf file



  1. Add project details in to <Sonar_Scanner_Path>/conf/sonar-scanner.properties
    1. sonar.host.url=http://localhost:9000
    2. sonar.sourceEncoding=UTF-8
    3. sonar.projectKey=amx_claro:eoc
    4. sonar.projectName=AMX_CLARO
    5. sonar.projectVersion=1.0
    6. sonar.sourceEncoding=UTF-8
    7. sonar.modules=module1
    8. sonar.sources=src (source code path)
    9. module1.sonar.projectName=module1
  2.  Start Sonar Qube by executing StartSonar.bat file from the path:<SonarQube_Path>\bin\windows-x86-32
  3. Above command will run the sonar qube engine in 9000 port. We can access it by http://localhost:9000/projects
  4. Start Sonar Scanner by executing sonar-scanner.bat file from the path : <Sonar_Scanner_Path>\bin
  5. On Start,  sonar scanner will scan the project based on the inputs details given in sonar-scanner.properties
  6. On Completion of scan , below message is dieplayed

  1. Scanned result can be accessed through http://localhost:9000/dashboard/index/amx_claro:eoc

0 comments :

Post a Comment

 
Top