How to enable clover reports for a dependency for specific webapps

I want to test a particular clover configuration wherein I want to enable clover for a jar.

This jar is used by multiple webapps(wars). And I want to generate clover recording files and clover reports for this jar only for a particular webapps instead of all webapps which use this jar.

1 answer

1 accepted

1 vote

Hi Anuj,

Why do you need such specific configuration?

The best is to create two versions of the JAR library: one with Clover instrumentation and one without it and package webapp WAR files using appropriate version of the jar.

There is no switch which allows to disable Clover at runtime. The only 'hack' you could use is to make clover.db inaccessible - without database Clover's coverage recorders will not start.

Cheers
Marek

Thanks for the reply.

My problem is I want to enable clover recordings for a jar only for particular webapps. But if I enable it for one jar then recording files are generated in all webapps where that jar is being used.

Can you suggest a possbile workaround for this.

As I wrote, put this jar only in these webapps where you want to have coverage collected.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Fadoua M. Boualem
Published Monday in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

499 views 8 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you