Sara
Sara

Reputation: 39

Sonar build is failing by showing on project xxxxx: sonar.profile was set to 'YYYY' but didn't match any profile for any language

I am getting the following error while running 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

I am running sonar for the main project which holds multiple sub projects. Do I need to change this property file ? I have referred many links. But still getting the error. Is it depends on the maven plugin ? I am using maven 3.0.2 and sonarqube 5.2

Please help me. Thanks in advance.

Upvotes: 0

Views: 336

Answers (1)

G. Ann - SonarSource Team
G. Ann - SonarSource Team

Reputation: 22794

sonar.profile has been deprecated since SonarQube 4.5, which was released in late 2014. I.E. it has been deprecated for a long time.

Your use of sonar.profile tells the analyzer to use the rule set named project_abc. You should remove this setting and let the default profile be applied. If you really don't want the default profile, then you should use the SonarQube UI to explicitly assign the project to the profile you do want used.

Upvotes: 1

Related Questions