sonar maven plugin build error, SonarQube version: null

前端 未结 6 1580
你的背包
你的背包 2021-01-05 12:48

My jenkins builds just started to fail with this message:

[INFO] --- sonar-maven-plugin:2.7:sonar (default-cli) @ cividas-core-web ---
[INFO] artifact com.on         


        
6条回答
  •  不知归路
    2021-01-05 13:40

    We had the same problem at work today, we automatically use the latest version for maven and sonar plugins. It wasn't easy to find the problem at first.

    The answer elcodedocle has given is correct, but i would like to add for those that use maven with sonar in an automated fashion that this is a solution aswell:

    org.codehaus.mojo:sonar-maven-plugin:2.6:sonar

    This way it runs on the older version 2.6 and i can confirm that it works.

    There is probably a bug in 2.7 and i hope it gets fixed soon. This was our error:

    [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven plugin:2.7:sonar (default-cli) on project (projectName): Unable to determine structure of project. Probably you use Maven Advanced Reactor Options with a broken tree of modules. "(projectName)" is orphan -> [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
    

    EDIT: Take a look at this post for some more information: Jenkins Sonar plugin suddenly stops working

    Here is explained that the new version, 2.7, of the plugin is no longer compatible with java 6 projects. You can also find an explanation about how to fix it in Jenkins if you are not familiar with it. (my explanation was a bit short)

提交回复
热议问题