Sonarqube is not showing code coverage after running

前端 未结 3 1598
梦如初夏
梦如初夏 2021-02-19 02:29

I\'m running sonarqube with maven.

I have installed it using following way. Using brew, I installed mysql and sonar.

When

3条回答
  •  别那么骄傲
    2021-02-19 03:17

    I've resolved this by using the following steps:

    1.To begin, I've add configuration in our pom.xml.

    
      jacoco
      ${project.basedir}/../target/jacoco.exec
      java
    
    

    2.In sonarqube properties file added the below part.

    sonar.projectName=${JOB_NAME}
    sonar.projectVersion=1.0.0
    sonar.sources=src/main
    sonar.sourceEncoding=UTF-8
    sonar.language=java
    sonar.tests=src/test
    sonar.junit.reportsPath=target/surefire-reports
    sonar.surefire.reportsPath=target/surefire-reports
    sonar.jacoco.reportPath=target/jacoco.exec
    sonar.binaries=target/classes
    sonar.java.coveragePlugin=jacoco
    sonar.verbose=true
    

提交回复
热议问题