I'm trying to set up the Sonar-Gerrit plugin on a Jenkin job.
Here is the Jenkins console error output :
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar ( default-cli) on project parent: Failed to execute project builder: fr.techad.sonar.GerritProjectBuilder: Failed to execute command 'gerrit review 298816ea2b24645fd971a8c0833582cec1163dac -j' on UserAtHost@55a9f72f [user=jenkins, host=172.21.33.193, port=29418]: reject HostKey: 172.21.33.193 -> [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
Looking the [Help 1].It says
this exception is not generated by the Maven core itself but by a plugin.
Did anyone have this same error? how can I try to fix it?
your exception says:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin
It's your maven plugin for sonar is failing the job, not the sonar-gerrit plugin.
Failed to execute command 'gerrit review 298816ea2b24645fd971a8c0833582cec1163dac -j'
I don't know what does sonarqube command "gerrit review -j" and it looks like that this sonar-maven-plugin doesn't know it, either.
You could try looking into this question - it may help you to configure sonarqube for your project: Why Maven command MVN sonar:sonar works without any plugin configuration in my POM.xml?