运行 mvn sonar:sonar
时出现以下错误**Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar (default-cli) on project xxxxx: sonar.profile was set to 'YYYY' but didn't match any profile for any language. Please check your configuration.**
sonar-project.properties file is : -
----------------------------------------------
# ---- Project metadata
sonar.projectKey=a.b.c.d.play
sonar.projectName=abc
sonar.projectDescription=abc
sonar.projectVersion=1.0
# ---- Default settings
sonar.profile=project_abc
# ---- Code coverage..
#Tells SonarQube to reuse existing reports for unit tests execution and coverage reports
sonar.dynamicAnalysis=reuseReports
#Tells SonarQube where the unit tests execution reports are
sonar.surefire.reportsPath=target/surefire-reports
#Tells SonarQube that the code coverage tool by unit tests is JaCoCo
sonar.java.coveragePlugin=cobertura
#Tells SonarQube where the unit tests code coverage report is
sonar.cobertura.reportPath=test-result/code-coverage/coverage.xml
# ---- Module definitions
sonar.modules=play_java,play_web,play_js,play_groovy
play_java.sonar.projectBaseDir=a/b
play_java.sonar.sonar.language=java
play_java.sonar.sources=app
play_java.sonar.binaries=precompiled
play_java.sonar.exclusions=**/*.html
play_java.sonar.cobertura.reportPath=test-result/code-coverage/coverage.xml
play_java.sonar.dynamicAnalysis=reuseReports
play_java.sonar.java.coveragePlugin=cobertura
play_web.sonar.projectBaseDir=a/b
play_web.sonar.language=web
play_web.sonar.sources=app
play_js.sonar.projectBaseDir=a/b
play_js.sonar.language=js
play_js.sonar.sources=assets/javascripts
play_js.sonar.binaries=precompiled
play_js.sonar.exclusions=test/lib/*,test/JasmineConfigure.js,test/*.test.js,test/fixtures/*,thirdparty/**/*.js,thirdparty/*
play_groovy.sonar.projectBaseDir=a/b
play_groovy.sonar.language=grvy
play_groovy.sonar.sources=app
我正在为包含多个子项目的主项目运行声纳。 我需要更改此属性文件吗?我已经提到了许多链接。但仍然得到错误。 这取决于maven插件吗? 我使用 maven 3.0.2 和 sonarqube 5.2
请帮帮我。 提前谢谢。
答案 0 :(得分:0)
sonar.profile
已被弃用。它已被弃用很长时间。
您对sonar.profile
的使用告诉分析器使用名为project_abc
的规则集。您应该删除此设置并应用默认配置文件。如果您确实不想要默认配置文件,那么您应该使用SonarQube UI将项目明确地分配给您想要使用的配置文件。