要调用声纳独立分析,您必须配置所有项目属性。你做吧?这里有一个例子:
# required metadata
sonar.projectKey=yourapp:YourApplication
sonar.projectName=YourApplication
sonar.projectVersion=1.0
# path to source directories (required)
sonar.sources=yourApplication/JavaSource
# path to test source directories (optional)
sonar.tests=test
# path to project binaries (optional), for example directory of Java bytecode
sonar.binaries=YourApplication/build/classes/main
# optional comma-separated list of paths to libraries. Only path to JAR file and path to directory of classes are supported.
#sonar.libraries=path/to/library.jar,path/to/classes/dir
# The value of the property must be the key of the language.
sonar.language=java
sonar.dynamicAnalysis=reuseReports
#Surefire reports
sonar.surefire.reportsPath=yourApplication/build/test-results
sonargraph.prepareForSonar=true
# Additional parameters
#sonar.my.property=value
In base of your version of sonar / jenkins this configuration should be slightly different
Then, if you don't make any change in the base configuration of Sonar, you don't need to put user=sonar, password=sonar