当前位置:首页 > maven+jenkins+sonar集成搭建
13
第六章常见错误
6.1sonar没有启动
错误如下:
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.2:sonar (default-cli) on project scmp: SonarQube server can not be reached at http://localhost:9000. Please check the parameter 'sonar.host.url'. Connection refused: connect -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [JENKINS] Archiving D:\\Program Files\\Jenkins\\workspace\\scmp\\scmp\\pom.xml to com.fnii.scmp/scmp/0.0.1-SNAPSHOT/scmp-0.0.1-SNAPSHOT.pom [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 An attempt to send an e-mail to empty list of recipients, ignored. channel stopped 14
Skipping sonar analysis due to bad build status FAILURE An attempt to send an e-mail to empty list of recipients, ignored. Finished: FAILURE 解决方法:应先运行sonar,在运行Jenkins进行构建项目
6.2 Maven setting.xml配置
错误如下:
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.3.1:sonar (default-cli) on project scmp: SonarQube server can not be reached at http://localhost:9000. Please check the parameter 'sonar.host.url'. Connection refused: connect -> [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 解决方法:因为Maven中找不到sonar-maven-plugin配置,将下面文件直接替换即可:
6.3文件POM.xml配置
[ERROR] There are test failures. Please refer to D:\\Program Files\\Jenkins\\jobs\\scmp\\workspace\\scmp\\target\\surefire-reports for the individual test results. [JENKINS] Recording test results log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter). log4j:WARN Please initialize the log4j system properly. 在pom.xml的build标签中添加下面内容:
6.4 0 files indexd
运行Jenkins构建时出现检测不到文件:0 files indexd时,该错误的出现的可能原因有两个: 1.数据库出现问题,把相关数据库中表删除,重新构建。
2.导出时Repository depth选择错误,应当选择infinity,将工程中.repository文件删除,重新构建
16
共分享92篇相关文档