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

clover for several jar libraries connect to the application

I have an application that calls several jar libraries that are provided with instruments clover, how do I get a report of all classes in all these libraries together? I need to somehow merge files clover.db, that generated for each jar libraries?

3 answers

1 accepted

1 vote
Answer accepted

Hi Alex,

I assume that you have instrumented every library separately so that you have several clover.db files.

If yes, then first you have to make all of them accessible at runtime. So either:

  • set absolute paths in initstring for each library during build and use the same paths during application execution (run application on the same machine where was compiled, for instance) or
  • set relative paths in initstring for each library during build and provide clover.initstring.basedir parameter at runtime (databases will be located in "clover.initstring.basedir/initstring")

Next, you have to merge databases and coverage after tests. The CloverMerge command line tool, <clover-merge> Ant task or clover2:merge Maven goal can do this.

Next, you have to generate report using the merged database.

Alternatively, you could instrument all libraries and the application together, producing a single Clover database, which you could next use at runtime and for reporting. For example, if you're using Maven and have one master pom.xml (multi-module project), set the <singleCloverDatabase>true</singleCloverDatabase> for clover2:setup.

See also:

Regards
Marek

set absolute paths in initstring for each library during build and use the same paths during application execution (run application on the same machine where was compiled, for instance) or

set relative paths in initstring for each library during build and provide clover.initstring.basedir parameter at runtime (databases will be located in "clover.initstring.basedir/initstring")

How I can do it? (In pom.xml on webserver or anywhere else?)

0 votes

See clover2:setup goal, the cloverDatabase attribute.

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...

504 views 7 18
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