Execute mvn sonar:sonar error

java
(purgeyao) #1

hey,
I got it wrong when testing sonar。
The sonarsource service version is 7.7.0
The maven version is 3.6.0
sonar-maven-plugin version is 3.6.0.1398
Execute mvn sonar:sonar :
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project sonarqube-demo: org.sonar.plugins.pmd.PmdSensor has unsatisfied dependency ‘class org.sonar.api.profiles.RulesProfile’ for constructor ‘public org.sonar.plugins.pmd.PmdSensor(org.sonar.api.profiles.RulesProfile,org.sonar.plugins.pmd.PmdExecutor,org.sonar.plugins.pmd.PmdViolationRecorder,org.sonar.api.batch.fs.FileSystem)’ from org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@41a8f0d8:108<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@49038f97:311<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@41ddec69:51<| -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Hope to help solve the problem.

(Adam Gabryś) #2

It sounds like installed PMD Plugin is incompatible with SonarQube instance. You have to use 3.2.0 or newer.

Which version do you use?

1 Like
(purgeyao) #3

thank you
It’s the version problem
The problem was solved

(purgeyao) #4

PMD Plugin Version changed to 3.2