【发布时间】:2017-11-18 18:37:16
【问题描述】:
我正在使用以下命令来构建我的 maven 代码。
编译-
-DargLine="-DDB_SERVER=localhost -DDB_PORT=5432 -DDB_NAME=sample -DDB_USER=sample -DDB_PASSWORD=sample -DDB_MAX_POOL=10" -Dcom.sample.redis=false clean compiler:compile
单元测试分析-
DargLine=-DDB_SERVER=localhost -DDB_PORT=1234 -DDB_NAME=sample -DDB_USER=sample -DDB_PASSWORD=sample -DDB_MAX_POOL=10 -Dcom.sample.redis=false -Dcobertura:cobertura-integration-test -Dcobertura.aggregate=false -Dcobertura.report.format=xml integration-test test
并使用以下声纳属性来捕获要在声纳中发布的 xml。
sonar.projectKey=sample
sonar.projectName=sample
sonar.projectVersion=$PipelineId
sonar.modules=admin,client-api,common,om,serviceproviders
sonar.cobertura.reportPath=target/site/cobertura/coverage.xml
sonar.sources=.
sonar.skipPackageDesign=true
sonar.sourceEncoding=UTF-8
作为多模块,代码覆盖率仅显示 9.4%。我有什么遗漏吗。我也没有看到任何错误日志。如何使用 Jacoco 之类的覆盖工具实现相同的目标。
SonarQube - Version 5.1.1 - LGPL v3
【问题讨论】:
-
当前版本为 6.4,当前 LTS 为 5.6.6。您不太可能为
标签: maven sonarqube jacoco cobertura jacoco-maven-plugin