Please update sonar-maven-plugin to at least version 2.3

匿名 (未验证) 提交于 2019-12-03 09:06:55

问题:

I'm building a project in Jenkins with Sonar Integration.

Everything goes smoothly until the sonar analysis part. I get the following error:

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.2:sonar (default-cli) on project project-whatever: Can not execute SonarQube analysis: Please update sonar-maven-plugin to at least version 2.3 -> [Help 1]

and then the build fails.

I must explain that I have no references to sonar in my project pom.xml. This has been done exclusively with Jenkins configuration.

Does anyone have any ideia how to work around this?

回答1:

I was able to fix this issue by going into Manage Jenkins -> Configure System -> Scroll to the SonarQube section -> Click advanced -> fill in "Version of sonar-maven-plugin" with the verison you would like to use.....I used 2.5.



回答2:

If you can change the root pom.xml, then following should work as well:

<build>   <pluginManagement>     <plugins>       <plugin>         <groupId>org.sonarsource.scanner.maven</groupId>         <artifactId>sonar-maven-plugin</artifactId>         <version>3.1.1</version>       </plugin>     </plugins>   </pluginManagement> </build> 

More info in SonarQube docs



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!