国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

sonar8.9版本 win10安裝使用手冊

這篇具有很好參考價值的文章主要介紹了sonar8.9版本 win10安裝使用手冊。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

1. 安裝包準備:

注意:不同版本之間是有兼容性問題的,可參考官方推薦版本

下載地址

sonarqube 版本:8.9.9.56886 說明:snoar服務器

sonar-pdfplugin 版本:3.x 說明:測試報告生成pdf插件

sonarscanner 版本:4.7.0.2747-windows 說明:掃描器

sonarqube-community-branch-plugin-1.8.0.jar 說明:指定掃描分支,不安裝,默認掃描master分支

java環(huán)境:jdk 11

2. 環(huán)境準備

配置系統(tǒng)環(huán)境變量

2.1 配置sonar-scanner
變量名:SONAR_SCANNER_HOME
變量值(安裝包所在位置):D:\work\soft\sonarqube\sonar-scanner-4.7.0.2747-windows
path新增:%SONAR_SCANNER_HOME%\bin

驗證:

$ sonar-scanner -v
INFO: Scanner configuration file: D:\work\soft\sonarqube\sonar-scanner-
4.7.0.2747-windows\bin\..\conf\sonar-scanner.properties
INFO: SonarScanner 4.7.0.2747
INFO: Java 11.0.14.1 Eclipse Adoptium (64-bit)
INFO: Windows 10 10.0 amd64
2.2 配置sonarQube
  1. 配置jdk11的環(huán)境
變量名:JAVA_HOME11
變量值(安裝包所在位置):D:\work\soft\jdk-11.0.16.1_windows-x64_bin\jdk-11.0.16.1
path新增:%JAVA_HOME11%\bin
  1. 修改\conf\wrapper.conf配置文件

    # Path to JVM executable. By default it must be available in PATH.
    # Can be an absolute path, for example:
    wrapper.java.command=D:/tools/jdk-11.0.16.1_windows-x64_bin/jdk-11.0.16.1/bin/java.exe
    #wrapper.java.command=java
    #
    # DO NOT EDIT THE FOLLOWING SECTIONS
    #
    
    
    #********************************************************************
    # Wrapper Java
    #********************************************************************
    wrapper.java.additional.1=-Dsonar.wrapped=true
    wrapper.java.additional.2=-Djava.awt.headless=true
    wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
    wrapper.java.classpath.1=../../lib/sonar-application-8.9.9.56886.jar
    wrapper.java.classpath.2=../../lib/jsw/wrapper-3.2.3.jar
    wrapper.java.classpath.3=../../lib/sonar-shutdowner-8.9.9.56886.jar
    wrapper.java.library.path.1=./lib
    wrapper.app.parameter.1=org.sonar.application.App
    wrapper.java.initmemory=8
    wrapper.java.maxmemory=32
    
    #********************************************************************
    # Wrapper Logs
    #********************************************************************
    
    wrapper.console.format=PM
    wrapper.console.loglevel=INFO
    wrapper.logfile.format=M
    wrapper.logfile.loglevel=INFO
    wrapper.logfile.rollmode=DATE
    wrapper.logfile=../../logs/sonar.YYYYMMDD.log
    
    # Maximum size that the log file will be allowed to grow to before
    #  the log is rolled. Size is specified in bytes.  The default value
    #  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
    #  'm' (mb) suffix.  For example: 10m = 10 megabytes.
    #wrapper.logfile.maxsize=0
    
    # Maximum number of rolled log files which will be allowed before old
    #  files are deleted.  The default value of 0 implies no limit.
    wrapper.logfile.maxfiles=7
    
    # Log Level for sys/event log output.  (See docs for log levels)
    wrapper.syslog.loglevel=NONE
    
    #********************************************************************
    # Wrapper Windows Properties
    #********************************************************************
    # Title to use when running as a console
    wrapper.console.title=SonarQube
    
    # Disallow start of multiple instances of an application at the same time on Windows
    wrapper.single_invocation=true
    
    #********************************************************************
    # Wrapper Windows NT/2000/XP Service Properties
    #********************************************************************
    # WARNING - Do not modify any of these properties when an application
    #  using this configuration file has been installed as a service.
    #  Please uninstall the service before modifying this section.  The
    #  service can then be reinstalled.
    
    # Name of the service
    wrapper.ntservice.name=SonarQube
    
    # Display name of the service
    wrapper.ntservice.displayname=SonarQube
    
    # Description of the service
    wrapper.ntservice.description=SonarQube
    
    # Service dependencies.  Add dependencies as needed starting from 1
    wrapper.ntservice.dependency.1=
    
    # Mode in which the service is installed.  AUTO_START or DEMAND_START
    wrapper.ntservice.starttype=AUTO_START
    
    # Allow the service to interact with the desktop.
    wrapper.ntservice.interactive=false
    
    #********************************************************************
    # Forking Properties
    #********************************************************************
    wrapper.disable_restarts=TRUE
    wrapper.ping.timeout=0
    wrapper.shutdown.timeout=0
    wrapper.jvm_exit.timeout=0
    
    
  2. 將下載的sonarqube-community-branch-plugin-1.8.0.jar插件放到\sonarqube-8.9.9.56886\extensions\plugins\目錄下

  3. 修改\conf\sonar.properties

# WEB SERVER
sonar.web.javaAdditionalOpts=-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-1.8.0.jar=web
sonar.ce.javaAdditionalOpts=-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-1.8.0.jar=ce

-Dsonar.pdf.username=admin
-Dsonar.pdf.password=admin


3. 運行snoarQube

在\sonarqube-8.9.9.56886\bin\windows-x86-64\下,運行StartSonar.bat文件

第一次運行時會要求要修改密碼,根據(jù)提示修改密碼

賬號:admin
修改后密碼:admin123

4.sonarQube的配置項目

4.1創(chuàng)建項目

sonarqube win安裝教程,工具類的使用,springboot,java,spring boot,單元測試

4.2訪問授權令牌

sonarqube win安裝教程,工具類的使用,springboot,java,spring boot,單元測試

4.3生成令牌

sonarqube win安裝教程,工具類的使用,springboot,java,spring boot,單元測試

4.4maven掃描運行方式

sonarqube win安裝教程,工具類的使用,springboot,java,spring boot,單元測試

5.springcloud項目的配置

5.1添加配置文件sonar-project.properties

在被掃描的項目/模塊路徑下新增配置文件sonar-project.properties

配置文件內(nèi)容文章來源地址http://www.zghlxwxcb.cn/news/detail-818437.html

# must be unique in a given SonarQube instance
sonar.projectKey=test-service

# --- optional properties ---

# defaults to project key
#sonar.projectName=My project
sonar.projectName=test-service
# defaults to 'not provided'
#sonar.projectVersion=1.0
sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Defaults to .
#sonar.sources=.

# 源代碼目錄,如果多個使用","分割 例如:mode1/src/main,mode2/src/main
sonar.sources=src/main/java

# 單元測試目錄,如果多個使用","分割 例如:mode1/src/test,mode2/src/test
sonar.tests=src/test/java

# java字節(jié)碼目錄
sonar.java.binaries=target/classes

# 單元測試報告目錄
#sonar.junit.reportsPath=target/surefire-reports

sonar.coverage.jacoco.xmlReportPaths=target/surefire-reports
# 代碼覆蓋率插件
sonar.java.coveragePlugin=jacoco

# jacoco.exec文件路徑
sonar.jacoco.reportPath=target/coverage-reports/jacoco.exec


# 忽略的目錄
#sonar.exclusions=*/src/test/**/*

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

sonar.login=admin
sonar.password=admin123
5.2pom.xml

在項目的父pom中添加依賴和插件依賴

   <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>${mockito.version}</version>
        </dependency>
        <!-- Jacoco dependencies. -->
        <dependency>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.6</version>
        </dependency>
     <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- 單元測試 -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

   <plugin>
                <!-- Configures the compiler. -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <compilerArgs>
                        <arg>-Xlint</arg>
                    </compilerArgs>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <testFailureIgnore>true</testFailureIgnore>
                </configuration>
                <version>2.22.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.22.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <!-- Code coverage plugin. -->
                <!-- This sets up code coverage for the unit tests, the integration tests, -->
                <!-- and the combined coverage of both. -->
                <!-- After running a `mvn clean install`, open `target/site/jacoco-both/index.html` in a browser. -->
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.6</version>
                <configuration>
                    <includes> <!--覆蓋率計算包含的類-->
                        <include>**/controller/**/*</include>
                        <include>**/service/**/*</include>
                    </includes>
                    <excludes> <!--排除像entity、配置等無單元測試意義的類。如有,在Sonar服務端也需要配合排除(Ignore Code Coverage: https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/#header-5)-->
                        <exclude>**/config/**/*</exclude>
                        <exclude>**/entity/**/*</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-site</id>
                        <phase>package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>  
    
5.3執(zhí)行掃描

在sonar-project.properties文件所在位置執(zhí)行命令

mvn clean verify sonar:sonar -Dsonar.branch.name=develop

6. vue項目的配置

6.1 添加配置文件sonar-project.properties

在被掃描的項目/模塊路徑下新增配置文件sonar-project.properties

配置文件內(nèi)容

# must be unique in a given SonarQube instance
sonar.projectKey=web-service

# --- optional properties ---

# defaults to project key
#sonar.projectName=My project
sonar.projectName=web-service
# defaults to 'not provided'
#sonar.projectVersion=1.0
# 中文的字段需要用Unicode轉(zhuǎn)碼,展示到sonarqube的web中才不會亂碼
sonar.projectName=\u6d4b\u8bd5\u9879\u76ee

# 可用的配置項
sonar.projectVersion=1.0
sonar.sourceEncoding=UTF-8
sonar.sources=./src
sonar.exclusions=/node_modules/
sonar.tests=./src
sonar.test.inclusions=**/*.spec.ts

# \u5FFD\u7565\u7684\u76EE\u5F55
#sonar.exclusions=*/src/test/**/*

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

sonar.login=admin
sonar.password=admin123
6.2 在sonar-project.properties文件所在位置執(zhí)行命令
sonar-scanner.bat -D"sonar.projectKey=web-service" -D"sonar.sources=." -D"sonar.host.url=http://localhost:9000" -D"sonar.login=admin" -D"sonar.branch.name=dev"

到了這里,關于sonar8.9版本 win10安裝使用手冊的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領支付寶紅包贊助服務器費用

相關文章

  • 開源元數(shù)據(jù)管理平臺Datahub最新版本0.10.5——安裝部署手冊(附離線安裝包)

    開源元數(shù)據(jù)管理平臺Datahub最新版本0.10.5——安裝部署手冊(附離線安裝包)

    大家好,我是獨孤風。 開源元數(shù)據(jù)管理平臺Datahub近期得到了飛速的發(fā)展。已經(jīng)更新到了0.10.5的版本,來咨詢我的小伙伴也越來越多,特別是安裝過程有很多問題。本文經(jīng)過和群里大伙伴的共同討論,總結出安裝部署Datahub最新版本的部署手冊,希望能幫助到大家。 文章較長,

    2024年02月14日
    瀏覽(22)
  • 元數(shù)據(jù)管理平臺Datahub0.10.5版本安裝部署與導入各種元數(shù)據(jù)手冊

    元數(shù)據(jù)管理平臺Datahub0.10.5版本安裝部署與導入各種元數(shù)據(jù)手冊

    官網(wǎng)文檔連接 DataHub Quickstart Guide | DataHub (datahubproject.io) 本文所選擇的Python的版本為3.8.16,Docker版本為20.10.0,Datahub為0.10.5版本 python必須為3.7以上的版本。0.10.5不支持以下的版本 如果要使用web上的 添加數(shù)據(jù)源? 直接調(diào)用的python和pip命令 需要把環(huán)境變量設置過去。不能用pyth

    2024年02月07日
    瀏覽(47)
  • WIN10安裝MXNET GPU版本

    WIN10安裝MXNET GPU版本

    1. 下載Visual Studio Community 2019? Visual Studio 2019 系統(tǒng)要求 | Microsoft Learn 2. 安裝CUDA、cuDNN CUDA Toolkit - Free Tools and Training | NVIDIA Developer CUDA Deep Neural Network (cuDNN) | NVIDIA Developer 【W(wǎng)indows11】Cuda和Cudnn詳細安裝教程_Jin·的博客-CSDN博客_cudnn安裝 3.?安裝opencv與openBLAS Home - OpenCV 環(huán)境變量添

    2024年02月07日
    瀏覽(21)
  • 【項目實戰(zhàn)】自定義設置Sonar的規(guī)則,要求DevOps工具鏈SonarQube只掃描指定模塊

    開發(fā)微服務項目,很多會基于網(wǎng)絡上現(xiàn)成開源的微服務框架進行二開,公司有單元測試覆蓋率的要求,往往會使用SonarQube 來實現(xiàn)掃描代碼的單元測試覆蓋率,但是因為網(wǎng)絡上現(xiàn)成開源的微服務框架很大部分是已經(jīng)現(xiàn)成的代碼,因此補充單元測試工作會很痛苦,于是,可以自定

    2024年02月14日
    瀏覽(21)
  • Win10 OpenCV編譯安裝CUDA版本

    Win10 OpenCV編譯安裝CUDA版本

    Win10 + Microsoft Visual Studio Community 2017 + CUDA11.3 + CUDNN8.2 + RTX GeForce 3090 + OpenCV4.5.3 前往官網(wǎng)下載Visual Studio Installer即可,做如下勾選,安裝即可 完成后,查看環(huán)境變量,將MSVC編譯器地址加入環(huán)境變量 前往官網(wǎng)下載CUDA和對應的CUDNN,切記一定要對應CUDNN和CUDA版本,根據(jù)提示一步一

    2024年02月06日
    瀏覽(34)
  • win10適合安裝哪個版本的office

    win10適合安裝哪個版本的office

    office是現(xiàn)在很多辦公、學習都要使用的軟件,它有著word、excel等多種常用工具。很多朋友在使用win10時都不知道win10系統(tǒng)兼容哪些版本的office,下面就跟著小編一起來看一下吧。 win10兼容哪些版本office ?所有版本的office都是可以兼容的。還是建議安裝較新的版本 office各個版本

    2024年02月04日
    瀏覽(20)
  • Win10安裝GPU支持的最新版本的tensorflow

    Win10安裝GPU支持的最新版本的tensorflow

    我在安裝好cuda和cudnn后,使用pip install tensorflow安裝的tensorflow都提示不能找到GPU, 為此懷疑默認暗轉(zhuǎn)的tensorflow是不帶GPU支持的。 在tensorflow官網(wǎng)提供了多個版本的GPU支持的windows的安裝包 https://www.tensorflow.org/install/pip?hl=zh-cn#system-install 下載后再安裝就可以成功安裝GPU支持的t

    2024年02月13日
    瀏覽(24)
  • Win 10 MySQL 安裝詳細教程(版本:8.2.0 Innovation)

    Win 10 MySQL 安裝詳細教程(版本:8.2.0 Innovation)

    ????????下載地址:?https://dev.mysql.com/downloads/mysql/? ????????選擇需要安裝的版本若下拉框沒有需求版本 詳見步驟2 ????????下載地址:? https://downloads.mysql.com/archives/community/ ????????MySQL壓縮包解壓到任意目錄 (可以根據(jù)自己的盤符目錄選擇) ????????①進入M

    2024年02月02日
    瀏覽(48)
  • Win10同時安裝MYSQL5.7和MYSQL8.0版本

    Win10同時安裝MYSQL5.7和MYSQL8.0版本

    官網(wǎng)下載網(wǎng)址:https://dev.mysql.com/downloads/ 2.1、解壓文件夾,然后新建一個 my.ini 文件 my.ini文件內(nèi)容: 2.2、以 管理員身份運行 cmd命令提示符,切換到 bin 路徑下。 輸入命令: mysqld --initialize --console 然后記住隨機密碼 2.3、安裝MySQL5服務 【my.ini更改為自己的安裝路徑?。?!管理員

    2024年02月10日
    瀏覽(18)
  • Win7環(huán)境64win操作系統(tǒng),安裝microsoft office2010 時MSXML版本6.10.1129.0,無法安裝的解決辦法

    Win7環(huán)境64win操作系統(tǒng),安裝microsoft office2010 時MSXML版本6.10.1129.0,無法安裝的解決辦法

    ** 第一步 :在百度搜索MSXML6.10.1129.0軟件進行下載,大概就是5M左右的大小,下載后解壓,選擇 第二項進行安裝。 第二步: 按照https://mip.win7zhijia.cn/jiaocheng/win7_41377.html進行修改注冊表。 但是往往按照以上步驟修改完注冊表后還是不能正常安裝。 原因是修改注冊表時出錯,如

    2024年02月12日
    瀏覽(25)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領取紅包,優(yōu)惠每天領

二維碼1

領取紅包

二維碼2

領紅包