[英]Why SonarScanner ignores sonar.sources value (You must define the following mandatory properties)?
I would like you to help me with a problem that I have when executing: 'build now', because when I execute it the console output shows a series of failures 我希望您能在执行时遇到一个问题:“立即生成”,因为执行该操作时,控制台输出显示了一系列故障
One of the failures was and still is, the properties of the file, I have already configured them and it is still giving faults, I have also saved them in the project directory, but nothing keeps failing. 其中一个失败是,现在仍然是,文件的属性,我已经配置了它们,并且仍然出现错误,我也将它们保存在项目目录中,但是没有任何失败。
these are the properties which i have in my project 这些是我在项目中拥有的属性
sonar.projectKey=sistema_integracion
sonar.projectName=sistema_integracion
sonar.projectVersion=1.0
sonar.projectDescription=proyecto_asir
sonar.source=C:\Program Files (x86)\Jenkins\workspace\proyecto_integracion\spring_boot\src\main\java\hello
sonar.language=java
sonar.java.binaries=.
sonar.sourceEncoding=UTF-8
sonar.scm.disabled=True
-And these are the flaws , I would appreciate all the help possible. -这些都是缺陷,我将不胜感激。 Thank you so much. 非常感谢。
ERROR: Error during SonarQube Scanner execution 错误:SonarQube扫描仪执行期间出错
ERROR: You must define the following mandatory properties for 'sistema_integracion': sonar.sources 错误:您必须为“ sistema_integracion”定义以下必需属性:sonar.sources
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging. 错误:使用-X开关重新运行SonarQube Scanner以启用完整的调试日志记录。
WARN: Unable to locate 'report-task.txt' in the workspace. 警告:无法在工作区中找到“ report-task.txt”。 Did the SonarScanner succeeded? SonarScanner成功了吗?
ERROR: SonarQube scanner exited with non-zero code: 1 错误:SonarQube扫描仪以非零代码退出:1
Finished: FAILURE 完成:失败
Here is your problem: 这是您的问题:
ERROR: You must define the following mandatory properties for 'sistema_integracion': sonar.sources
You defined an absolute path: 您定义了一条绝对路径:
sonar.source=C:\Program Files (x86)\Jenkins\workspace\proyecto_integracion\spring_boot\src\main\java\hello
The path must be relative. 路径必须是相对的。 If this is your file structure: 如果这是您的文件结构:
sonar-project.properties
src
\-main
\-java
Then you should set: 然后,您应该设置:
sonar.sources=src/main/java
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.