Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to upload Clover Code coverage report to SonarQube dashboard?

I'm facing the issue while uploading clover code coverage report to SonarQube dashboard.

In the project target folder i'm able to see the clover generated report, but not sure what parameters needs to passed for the clover report to be pushed to SonarQube Dashboard?

The documentation mentioned in the wiki : https://docs.sonarqube.org/display/SONARQUBE45/Clover+Plugin  says to set a property "sonar.clover.reportPath"  following the wiki, this is how i've configured my pom. But still its not uploading the clover report to sonarQube dasboard.

This is how my pom.xml file is configured.

<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<packaging>pom</packaging>
	
	<properties>
		<!-- MAVEN CONFIGURATIONS -->
		<java.version>1.8</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.clover2.plugin.version>4.0.6</maven.clover2.plugin.version>
		<sonar.clover.reportPath>${project.basedir}/target/site/clover/clover.xml</sonar.clover.reportPath>
	</properties>
	
	<build>
		<plugin>
			<groupId>com.atlassian.maven.plugins</groupId>
			<artifactId>maven-clover2-plugin</artifactId>
			<version>${maven.clover2.plugin.version}</version>
			<configuration>
				<generateHtml>true</generateHtml>
				<generateXml>true</generateXml>
				<includesTestSourceRoots>false</includesTestSourceRoots>
				<includesAllSourceRoots>true</includesAllSourceRoots>
				<excludes>
					<exclude>**/*Exception*.java</exclude>
				</excludes>
				<license>***</license>
			</configuration>
		</plugin>
	</build>
</project>

Command that i'm executing : mvn -X clean install clover2:instrument clover2:aggregate clover2:clover sonar:sonar

 

 

1 answer

0 votes

Hi Manjunath!

I'm facing the issue while uploading clover code coverage report to SonarQube dashboard.

Could you give more details, please? Do you see any error messages?

 

Command that i'm executing : mvn -X clean install clover2:instrument clover2:aggregate clover2:clover sonar:sonar

Did you try using the clover2:setup? It will not fork the parallel build cycle, as the clover2:instrument does, so hopefully it will better cooperate with the Sonar plugin. Please try the following:

 

mvn clean clover2:setup install clover2:aggregate clover2:clover sonar:sonar

 

Cheers
Marek

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Happy New Year and Welcome New Marketplace Partner Program Partners!

Happy New Year! We hope you all had a safe and restful holiday season. 2020 was a unique year full of unforeseen events; however, as we enter the new year of 2021, we’re optimistic for the light at t...

387 views 5 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you