zoukankan      html  css  js  c++  java
  • CentOS6.8配置SonarQube Scanner配合SonarQube使用

    下载最新的SonarQube Scanner压缩包 
     
    1 解压缩到CentOs目录下 我的是 /usr/local/software/sonar-scanner-3.0.3.778-linux
    2 <install_directory>/conf/sonar-scanner.properties:  修改对应配置文件
       根据具体的你的URL 如果配置了sonar的context端口后还需要加上Context路径     
            #----- Default SonarQube server
            #sonar.host.url=http://localhost:9000
    3 Add the <install_directory>/bin directory to your path.  加入到环境变量 
        执行sonar-scanner命令出现下面表示安装成功
                usage: sonar-scanner [options]
                Options:
                     -D,--define <arg>     Define property
                     -h,--help             Display help information
                     -v,--version          Display version information
                     -X,--debug            Produce execution debug output
     
     
    4 使用sonar scanner   在项目根目录下创建sonar-project.properties文件
            Create a configuration file in the root directory of the project: sonar-project.properties
             sonar-project.properties
                关键配置  projectName 项目名 sources源代码目录
    # must be unique in a given SonarQube instance
    sonar.projectKey=my:project
    # this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
    sonar.projectName=My project
    sonar.projectVersion=1.0
    # Path is relative to the sonar-project.properties file. Replace "" by "/" on Windows.
    # This property is optional if sonar.modules is set.
    sonar.sources=.
    # Encoding of the source code. Default is default system encoding
    #sonar.sourceEncoding=UTF-8
     
     

    5 在sonar-project.properties所在目录 也就是 项目根目录 执行sonar-scanner就可以扫描了
    6 如果没有问题 就可以再sonar的web界面看到扫描结果了

    SonarQube的配置详见 http://www.cnblogs.com/QuestionsZhang/p/7115116.html

  • 相关阅读:
    Android权限 uses-permission
    Android中的颜色设置
    px 与 dp, sp换算公式?
    如何成为一名黑客?(转)
    uva 1291(dp)
    框架模式 MVC 在Android中的使用
    CCA概述和安装
    机房收费系统合作版(三)——UI思索
    (36)JS运动之使物体向右运动
    二叉查找树的非递归操作
  • 原文地址:https://www.cnblogs.com/QuestionsZhang/p/7115224.html
Copyright © 2011-2022 走看看