简体   繁体   English

为什么SonarScanner忽略sonar.sources值(您必须定义以下必需属性)?

[英]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.

相关问题 Jenkins SonarQube插件:您必须为“未知”定义以下必需属性 - Jenkins SonarQube plugin: You must define the following mandatory properties for 'Unknown' 声纳:在sonar.sources中使用星号 - Sonar: Using asterisk in sonar.sources 如何在詹金斯中为Sonar设置强制属性源 - How to set the mandatory properties sources for Sonar in Jenkins SonarQube Runner 2.4即使存在也无法在sonar-project.properties中找到sonar.sources - SonarQube Runner 2.4 can not find sonar.sources in sonar-project.properties even it exist 在jenkins插件中正确设置sonar.sources - correctly setting sonar.sources in jenkins plugin 带有org.sonarsource.scanner.maven的project:myproject的sonar.sources的值无效 - Invalid value of sonar.sources for project:myproject with org.sonarsource.scanner.maven SonarRunner找不到sonar.projectKey,sonar.projectName,sonar.projectVersion,sonar.sources - SonarRunner can't find sonar.projectKey, sonar.projectName, sonar.projectVersion, sonar.sources Jenkins vs SonarQube:与Sonar Runner和sonar.sources参数有关的问题 - Jenkins vs SonarQube: issue connected with Sonar Runner and sonar.sources parameter 我应该在哪里定义声纳凹槽的属性? - Where should I define properties in sonar-groovy? Gerrit to Sonar Plugin忽略了noIssuesScore - Gerrit to Sonar Plugin ignores noIssuesScore
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM