Sonar Runner does not use properties of sonar-project.properties

匿名 (未验证) 提交于 2019-12-03 01:45:01

问题:

I am using SonarQube Runner 2.4 at jenkins since today but the analysis fail with the message:

If I add the property "MyProject.sonar.sources=src" In the project properties in Jenkins (I use "Invoke Standalone Sonar Analysis"). I will receive the error message

ERROR: Caused by: Findbugs needs sources to be compiled. Please build project before executing sonar and check the location of compiled classes. 

This means the sonar-project.properties (/.jenkins/workspace/Deploy/MyProject/sonar-project.properties) is not read or used because there are all values defined:

sonar.language=java sonar.projectName=MyProject sonar.projectVersion=0.1 sonar.binaries=bin sonar.projectDescription= sonar.projectKey=MyProjectKey sonar.sources=src 

When sonar is executed I can see the correct path to MyProject where : -DMyProject.sonar.projectBaseDir=/.jenkins/workspace/Deploy/MyProject

Or does the name of sonar-project.properties changed?

回答1:

Please build the project in the release mode. After the build happens you will get the dll's produced somewhere. you have to point to that location.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!