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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • 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

java.lang.NoClassDefFoundError: com_cenqua_clover/CoverageRecorder

This is coming from a previous thread that is read-only now unfortunately so here is the history:



Jul 31, 2008

I have a multi-module project with maven clover2 plugin and clover 2.3.2. Module B pom.xml has dependency on a test-jar in Module A. I verified that the Module A has a target / clover/ test-classes dir generated with the required class in Module B.
When compiling with maven 2.0.7 (mvn clean install clover2:instrument clover2:clover) it tells me that the tests are failing in Module B.

CLOVER FATAL ERROR: Clover could not be initialised. Are you sure you have Clover in the runtime classpath? (class java.lang.NoClassDefFoundError:com_cenqua_clover/CloverVersionInfo)

When I look at surefire test reports - it shows me an error as below: testCardSaleTransaction(com.kryterion.ecom.PaymentManagerTest)
java.lang.NoClassDefFoundError: com_cenqua_clover/CoverageRecorder
at com.kryterion.jndi.context.TestingContextFactory.getInitialContext(

Now I can definitely get around it by adding clover as a dependency to Module B, but that would wrap that jar file in the final web app war which we don't really want.
Can someone point me to the root cause of the problem and a correct fix for this?
Thank you


Supposed work around which is NOT working

Aug 8, 2010

Hi Jay,

This problem is due to the fact that Maven2 doesn't handle artifacts with two classifiers correctly. In your case, -clover and -tests .
The work around for this is to use the clover2:setup goal instead of clover2:instrument when running your build with clover on.




We now write Jan 2012 and I am running into the same issue which is very frustrating ...

I am using clover2:setup but my build agents get horked by the clover run just like described above.

Would appreciate a statement if this issue is just not important enough to fix or what exactly is being done about this.



4 answers

2 votes

Hello Dirk,

Please note that the fastest way to get a response and a working solution is to raise an issue at I suppose that the most optimal will be to use clover2:setup with a Clover configured in a profile running in a separate build (to make sure that no instrumented classes will 'leak' into the production binaries) and a separate maven local cache for installing 'cloverized' binaries. I'm eager to help you, but without full build logs, information about project structure, pom.xml files etc it's really hard to do this.


1 vote

See also this KB article.

Should have came back to this question, once I did get past it, sorry. BUt I think Marek's answer is right on.

In our case we were using Jetty in our mavenized projects to run IT tests on the bamboo agent and simply adding clover as a dependency to the Jetty plugin did the trick. This keeps it out of the production war/ear, but lets the instrumented code run through testing.

DirkH, did you ever submit a ticket? What was the response?

Could not find goal 'setup' in plugin com.atlassian.maven.plugins:maven-clover2-plugin:2.3.1 among available goals instrument, check, log, save-history, aggregate, instrumentInternal, clover

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Opsgenie

Investigate deployment-related incidents with Bamboo and Opsgenie together

Back in April of last year one of the major product announcements from Opsgenie was the launch of the Incident investigation view which created a deep connection between Bitbucket and Opsgenie, empow...

151 views 1 4
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