#Configure here general information about the environment, such as SonarQube DB details for example
#No information about specific project should appear here #----- Default SonarQube server
sonar.host.url=http://10.17.10.34:9000/ #----- PostgreSQL
#sonar.jdbc.url=jdbc:postgresql://localhost/sonar #----- MySQL
sonar.jdbc.url=jdbc:mysql://10.117.150.34:33306/sonardb?useUnicode=true&characterEncoding=utf8 #----- Oracle
#sonar.jdbc.url=jdbc:oracle:thin:@localhost/XE #----- Microsoft SQLServer
#sonar.jdbc.url=jdbc:jtds:sqlserver://localhost/sonar;SelectMethod=Cursor #----- Global database settings
sonar.jdbc.username=sonarqube
sonar.jdbc.password=Sonarqube #----- Default source code encoding
sonar.sourceEncoding=UTF-8 #----- Security (when 'sonar.forceAuthentication' is set to 'true')
sonar.login=admin
sonar.password=admin

把sonar-runner添加到path环境变量:

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi # User specific environment and startup programs PATH=$PATH:$HOME/bin
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:/usr/local/sonar-runner-2.4/bin
export GOPATH=/root/go
export PATH

运行sonar-runner可能会报错:

unable to execute sonar

Failed to upload report - 500: An error has occurred. Please contact your administrator

大多是因为MySQL需要设置数据库允许接收的最大包,

mysql客户端命令行执行

set global max_allowed_packet =100*1024*1024;

show VARIABLES like ‘%max_allowed_packet%‘; 查看 max_allowed_packet收更新成功

然后重启sonar服务器

sonar runner的配置的更多相关文章

  1. Gradle 1.12用户指南翻译——第三十六章. Sonar Runner 插件

    本文由CSDN博客万一博主翻译,其他章节的翻译请参见: http://blog.csdn.net/column/details/gradle-translation.html 翻译项目请关注Githu ...

  2. sonarqube+sonar runner分析C#代码

    最近研究一个代码覆盖率和代码分析工具.遇到一些比较坑的问题,现在分享给大家. 1.Sonar介绍 Sonar是一个用于代码质量管理的开源平台,用于管理Java源代码的质量.通过插件机制,Sonar 可 ...

  3. sonar runner 2.4

    https://www.versioneye.com/java/org.codehaus.sonar.runner:sonar-runner-dist/2.4

  4. 超详细Gitlab Runner环境配置中文教程

    配置GitlabRunner环境 GitLab Runner 是一个开源项目, 它用来运行你定制的任务(jobs)并把结果返回给 GitLab. GitLab Runner 配合GitLab CI(G ...

  5. sonar gitlab+jenkins配置

    sonar.projectKey=test-news-activitysonar.projectName=test-news-activitysonar.projectVersion=$BUILD_N ...

  6. Sonar安装配置

    https://www.sonarqube.org/downloads/ 下载sonar.当前版本为6.2 解压压缩包,进行配置: 修改sonarqube-6.2\conf\sonar.propert ...

  7. [转]配置sonar、jenkins进行持续审查

    本文以CentOS操作系统为例介绍Sonar的安装配置,以及如何与Jenkins进行集成,通过pmd-cpd.checkstyle.findbugs等工具对代码进行持续审查. 一.安装配置sonar ...

  8. 配置sonar、jenkins进行持续审查

    本文以CentOS操作系统为例介绍Sonar的安装配置,以及如何与Jenkins进行集成,通过pmd-cpd.checkstyle.findbugs等工具对代码进行持续审查. 一.安装配置sonar ...

  9. sonar tomacat配置

    最近在学习Sonar,配置了好几天,才搭建起来环境,为自己的学习能力感到汗颜,赶紧在此记录一下,所谓好记性不如烂笔头. 1.Sonar介绍 Sonar是一个用于代码质量管理的开源平台,用于管理Java ...

随机推荐

  1. Windows Phone 7 检查手机网络

    using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Wi ...

  2. ScrollView 设置滚动是否可用

    extends:http://stackoverflow.com/questions/5763304/disable-scrollview-programmatically , http://stac ...

  3. 神兽保佑-代码无BUG

    ┏┓ ┏┓┏┛┻━━━┛┻┓┃ ┃ ┃ ━ ┃┃ ┳┛ ┗┳ ┃┃ ┃┃ ┻ ┃┃ ┃┗━┓ ┏━┛ ┃ ┃   神兽保佑 ┃ ┃   代码无BUG!       ┃ ┗━━━┓       ┃ ┣┓ ...

  4. Thinkphp上传图片

    上传图片的HTML结构: <form action="{:U('Config/addImg')}" enctype="multipart/form-data&quo ...

  5. linux 统计文件数量

    查找当前目录下compose文件的数量 ls -lr | grep "compose" | wc -l

  6. Nginx正向代理配置

    服务器端: server { resolver 8.8.8.8; resolver_timeout 5s; listen 0.0.0.0:8888; access_log /usr/local/ngi ...

  7. Mysql中datetime和timestamp区别

    DATETIME日期和时间的组合.支持的范围是'1000-01-01 00:00:00'到'9999-12-31 23:59:59'.MySQL以'YYYY-MM-DD HH:MM:SS'格式显示DA ...

  8. centos 系统软件包管理 yum 本地yum配置 扩展源epel rpm 清除yum缓存 yum provides "*/vim" 第十节课

    centos  系统软件包管理  yum 本地yum配置  扩展源epel  rpm  清除yum缓存  yum provides "*/vim"   第十节课 你不能保证可逆化操 ...

  9. 102-advanced-代码分割

    1.Bundling 大多数React应用程序将使用Webpack或Browserify等工具“捆绑”文件.捆绑是跟踪导入的文件并将它们合并到单个文件中的过程:“捆绑”.然后,该包可以包含在网页中以一 ...

  10. [css]浮动造成的影响

    浮动造成的影响: 子元素浮动,父元素无法被撑出高了. 如果要给父元素做通栏background? 如果两个box的子元素都浮动,且希望两个box分行显示? box1 box2 box3: float: ...