简体   繁体   中英

Jenkins cannot trigger a SonarQube project analysis with Maven

I am trying to configure Jenkins+Maven+SonarQube as described in the documentation on http://docs.sonarqube.org/display/SONAR/Triggering+SonarQube+on+Jenkins+Job#TriggeringSonarQubeonJenkinsJob-TriggeringaProjectAnalysiswithMaven

I installed the Sonar plugin (2.1) in Jenkins (1.570) - curiously, the plugin is called Sonar and not SonarQube as described on https://wiki.jenkins-ci.org/display/JENKINS/Plugins

I configured the plugin as described on http://docs.sonarqube.org/display/SONAR/Configuring+SonarQube+Jenkins+Plugin . I did not configure sonar-runner because I will not be using that, I will trigger all my analysis with Maven.

Now if I configure a Maven job, I do not have "Sonar" as a post-build action. I only have "Invoke Standalone Sonar Analysis", which is a sonar-runner, which I do not want.

What am I missing here?

Concerning name of the plugin (Sonar vs SonarQube) this is because there was no release of the plugin since renaming of the project.

Concerning your main issue, I think your are lost in Jenkins UI (don't worry it happens all the time):

  • "Post Steps" section contains a drop-down list with "Invoke standalone Sonar analysis" and indeed this is a SQ Runner step
  • "Post-build Actions" section contains a drop-down list with "Sonar" and that is the Maven step

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM