Jenkins Sonar Scanner vs Maven sonar:sonar goal

25
June 13, 2019, at 1:00 PM

I tried running a sonar analysis using a java project on Jenkins using the standard maven sonar:sonar goal and also using the post step>> Execute SonarQube scanner. The maven goal I used is.

clean org.jacoco:jacoco-maven-plugin:0.7.8:prepare-agent package org.jacoco:jacoco-maven-plugin:0.7.8:report sonar:sonar -Dmaven.test.failure.ignore=true

For SonarQube scanner I used the below maven goal

clean org.jacoco:jacoco-maven-plugin:0.7.8:prepare-agent package org.jacoco:jacoco-maven-plugin:0.7.8:report -Dmaven.test.failure.ignore=true

and in the Post step, I added Execute SonarQube scanner step.

Using maven sonar:sonar goal, I got 60% coverage and using the post step, I got only 49%. Not able to figure out the reason for the difference.

SonarQube version - 7.7 Sonar Scanner version - 3.3.0 Jenkins version - 2.164.3 Maven version - 3.6.1

READ ALSO
Shuffling Characters in a String [on hold]

Shuffling Characters in a String [on hold]

guysHow do I shuffle characters in a string using only Math

18
Unable to build with Java on Sublime Text

Unable to build with Java on Sublime Text

I am trying to use java on sublime textI set the build system to JavaC, and put some simple code from a text book I have and press ctrl+B to run the program

46
Can we call synchronized method of an object inside the constructor of the object in Java?

Can we call synchronized method of an object inside the constructor of the object in Java?

I am new to JavaI am wondering if it is possible to call a synchronized method inside constructor

10