Sonarqube Coverage 0% 이슈

Status
Publishing
Created By
Empty
Last Edited Time
7/13/2020, 3:38:00 PM
Description
Empty
Tags
Java
SonarQube
Unit Test
Gradle에 Jacoco 설정
buildscript { ext { springBootVersion = '1.5.7.RELEASE' } repositories { mavenCentral() maven { url "<https://plugins.gradle.org/m2/>" } } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") classpath ("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.2.1") } } apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'org.springframework.boot' apply plugin: 'org.sonarqube' apply plugin: 'jacoco' group = 'group' version = '0.0.1' sourceCompatibility = 1.8 repositories { mavenCentral() } dependencies { compile('org.springframework.boot:spring-boot-starter-web') testCompile('org.springframework.boot:spring-boot-starter-test') } /* jacoco 설정 */ jacocoTestReport { reports { xml.enabled false html.enabled true } } check.dependsOn jacocoTestReport /* sonarqube 설정 */ sonarqube { properties { property "sonar.projectName", "projectName" property "sonar.projectKey", "projectKey" property "sonar.sources", "src/main" property "sonar.tests", "src/test" property "sonar.sourceEncoding", "UTF-8" property "sonar.jacoco.reportPaths", "build/jacoco/test.exec" } }
Groovy