From 52284cb83312c1bcddf8d0698cf600b111b1ac40 Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Fri, 2 Dec 2022 12:41:21 +0100 Subject: [PATCH] Fixed Unitttestcoverage --- Jenkinsfile | 2 +- user-manager-server/pom.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5a97b24b..2eeec8df 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -100,7 +100,7 @@ pipeline { dir('user-manager-server') { try { withSonarQubeEnv('sonarqube-ozg-sh'){ - sh "./mvnw -s $MAVEN_SETTINGS test sonar:sonar -Dsonar.coverage.jacoco.xmlReportPaths=${env.WORKSPACE}/user-manager-server/target/jacoco-report/jacoco.xml" + sh "./mvnw -s $MAVEN_SETTINGS package sonar:sonar -Dsonar.coverage.jacoco.xmlReportPaths=${env.WORKSPACE}/user-manager-server/target/jacoco-report/jacoco.xml" } } catch (Exception e) { unstable("SonarQube failed") diff --git a/user-manager-server/pom.xml b/user-manager-server/pom.xml index 720c4750..0d65a87f 100644 --- a/user-manager-server/pom.xml +++ b/user-manager-server/pom.xml @@ -299,6 +299,8 @@ <systemPropertyVariables> <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> <maven.home>${maven.home}</maven.home> + <argLine>${surefire.jacoco.args}</argLine> + <classesDirectory>${project.build.outputDirectory}</classesDirectory> </systemPropertyVariables> </configuration> </plugin> -- GitLab