云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > maven+jenkins+sonar集成搭建

maven+jenkins+sonar集成搭建

  • 62 次阅读
  • 3 次下载
  • 2025/5/28 1:20:02

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配置,将下面文件直接替换即可:

sonar true jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8 com.mysql.jdbc.Driver sonar sonar http://192.168.5.67:9000 15

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标签中添加下面内容: org.apache.maven.plugins maven-surefire-plugin 2.4.2 true

6.4 0 files indexd

运行Jenkins构建时出现检测不到文件:0 files indexd时,该错误的出现的可能原因有两个: 1.数据库出现问题,把相关数据库中表删除,重新构建。

2.导出时Repository depth选择错误,应当选择infinity,将工程中.repository文件删除,重新构建

16

搜索更多关于: maven+jenkins+sonar集成搭建 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

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,

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com