#Configure here general information about the environment, such as SonarQube DB details for example #No information about specific project should appear here #----- Default SonarQube server sonar.host.url=http://ip:9000 #----- Default source code encoding sonar.sourceEncoding=UTF-8 sonar.login=个人账户生成的token
在项目根目录增加sonar-project.properties,内容如下:
1 2 3 4 5 6 7 8 9 10 11
# must be unique in a given SonarQube instance sonar.projectKey=ggg:aaa #对应的项目key为ggg:aaa # this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1. sonar.projectName=nnn #对应的项目名称为nnn sonar.projectVersion=1.0.0 #对应的版本为:1.0.0 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. # This property is optional if sonar.modules is set. sonar.sources=. sonar.java.binaries=target/classes #配置为项目具体的class目录,如果不配置的话只进行源代码分析 # Encoding of the source code. Default is default system encoding #sonar.sourceEncoding=UTF-8