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.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.