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

Not able to generate clover reports for integration tests using maven build. Edited

Kalyan Budati Jan 05, 2018

Hi,

I am running both Unit Tests and Integration Test and attached clover-plugin to both the profiles in my pom. If I run the mvn build for only unit tests, the clover report is getting generated fine. But if I run the mvn build for only Integration tests, then the clover report is not getting generated. Instead, it is throwing the following error in the logs.

[INFO] org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/myfolder/app/target/jetty/webapps/app/WEB-INF/classes/com/myconfig.class]; nested exception is java.lang.NoClassDefFoundError: com_atlassian_clover/TestNameSniffer
[INFO] at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:303)

--------------------

[INFO] org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/myfolder/app/target/jetty/webapps/app/WEB-INF/classes/com/myconfig.class]; nested exception is java.lang.NoClassDefFoundError: com_atlassian_clover/TestNameSniffer
[INFO] at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:303)

 --------------------

Even if I run mvn build to include both Unit and Integration tests together, it is throwing the above error and this time it is not even generating the report for Unit Tests as well. Any help is really appreciated. Note that I also have jacoco plugin for both these profiles in my pom and generating the jacoco report as well parallelly.

1 answer

0 votes
Grzegorz Lewandowski Atlassian Team Jan 12, 2018 • edited

Clover is required in the classpath when code coverage is being gathered.


I don't know how do you run your integration tests but generally speaking, please make sure clover.jar is available in the container. 

 

But note, you probably don't want this dependency in production so make sure it's there only when required (code coverage)

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Marketplace Apps & Integrations

Webinar alert! An IT Admin's Guide to Securing Collaboration at Scale

Hello, Atlassian Community! My name is Dave Meyer and I'm a Principal Product Manager at Atlassian. I wanted to give this community a heads up about an upcoming Webinar that might be of interest...

162 views 2 7
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