我在使用 MSBuild SonarQube 运行程序分析项目时遇到问题。SonarQube 数据库和服务器已启动并正在运行,我尝试分析一个示例项目,一切顺利。但是当我尝试分析我的项目时,出现了问题。分析完成,没有错误,但没有分析数据保存到数据库,没有问题,没有代码行数,什么都没有。
任何人都知道可能出了什么问题吗?
编辑:
声纳-project.properties:
sonar.projectKey=shrooms
sonar.projectName=Shrooms
sonar.projectVersion=1.0
sonar.sources=.
声纳属性:
sonar.jdbc.username=user
sonar.jdbc.password=pass
sonar.jdbc.url=jdbc:jtds:sqlserver://localhost;databaseName=SonarQubeDB;SelectMethod=Cursor
sonar.web.host=0.0.0.0
sonar.web.context=/sonarqube
sonar.web.port=9000
SonarQube.Analysis.xml:
<SonarQubeAnalysisProperties xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sonarsource.com/msbuild/integration/2015/1">
<Property Name="sonar.host.url">http://localhost:9000/sonarqube</Property>
<Property Name="sonar.login">admin</Property>
<Property Name="sonar.password">admin</Property>
<Property Name="sonar.jdbc.url">jdbc:jtds:sqlserver://localhost;databaseName=SonarQubeDB;SelectMethod=Cursor</Property>
<Property Name="sonar.jdbc.username">dbusername</Property>
<Property Name="sonar.jdbc.password">dbpassword</Property>
</SonarQubeAnalysisProperties>
在我运行分析后,在服务器日志中只添加了一个新行:
2015.07.30 17:02:29 INFO web[osscComputationService] 项目shrooms分析(报告4)(完成) | 时间=18179ms
MSBuild.SonarRunner 日志的最后几行:
5:01:18 PM 17:01:18.906 INFO - Execute decorators...
5:01:19 PM 17:01:19.969 INFO - Store results in database
5:02:05 PM 17:02:05.266 INFO - Analysis reports generated in 9578ms, dir size=82 KB
5:02:08 PM 17:02:08.922 INFO - Analysis reports compressed in 3656ms, zip size=285 KB
5:02:10 PM 17:02:10.704 INFO - Analysis reports sent to server in 1782ms
5:02:10 PM 17:02:10.704 INFO - ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/sonarqube
/dashboard/index/shrooms
5:02:10 PM 17:02:10.704 INFO - Note that you will be able to access the updated dashboard once the
server has processed the submitted analysis report.
5:02:14 PM INFO: ------------------------------------------------------------------------
5:02:14 PM INFO: EXECUTION SUCCESS
5:02:14 PM INFO: ------------------------------------------------------------------------
5:02:14 PM Total time: 8:10.724s
5:02:14 PM Final Memory: 14M/310M
5:02:14 PM INFO: ------------------------------------------------------------------------
5:02:15 PM Process returned exit code 0
5:02:15 PM The sonar-runner has finished
5:02:15 PM Creating a summary markdown file...
5:02:15 PM Analysis results: http://localhost:9000/sonarqube/dashboard/index/shrooms
Process returned exit code 0
Post-processing succeeded.