2分鐘學會sonar安裝使用

1:下載並解壓SonarQube(http://www.sonarqube.org/downloads/)

2:啓動SonarQube  Server

3:下載並解壓SonarQube Scannerhttp://docs.sonarqube.org/display/SONAR/Installing+and+Configuring+SonarQube+Scanner)用來掃描項目使用,並配置環境變量 例如:path=..\sonar-runner-2.4\bin

4:找一個項目工程,mavenant或者其它工程。配置sonar-project.properties,具體配置如下:

# Required metadata

sonar.projectKey=word-set(工程名稱)

sonar.projectName=word-set(工程名稱)
sonar.projectVersion=1.1

# Comma-separated paths to directories with sources (required)

sonar.sources=src

sonar.binaries=target

# Language

sonar.language=java

# Encoding of the source files

sonar.sourceEncoding=UTF-8

5cd命令行進入工程

執行sonar-runner

6:瀏覽器下執行 http://localhost:9000


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章