2 minutes to learn sonar installation and use

1 : Download and unzip SonarQube (http://www.sonarqube.org/downloads/)

2 : Start SonarQube Server

3 : Download and unzip SonarQube Scanner ( http://docs.sonarqube.org/display/SONAR/Installing+and+Configuring+SonarQube+Scanner ) to scan project usage and configure environment variables for example: path=..\sonar -runner-2.4\bin

4 : Find a project project , maven , ant or other projects. Configure sonar-project.properties , the specific configuration is as follows:

# 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

5 : cd command line to enter the project

Execute sonar-runner

6 : Execute http://localhost:9000 in the browser 


{{o.name}}
{{m.name}}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324114937&siteId=291194637