Maven 3, Tycho, and Clover.

Hello, we are using Maven 3 in conjunction with the Tycho plugin to build our projects and were looking to add Clover coverage. I've already enabled the maven-clover2-plugin in the POM file and have already done much configuration trying to get Clover to even recognize what tests need to be ran, however, I still don't think the instrumentation goal is doing what I'd like as when the reports are generated, it shows 0% coverage on every project.

The initial database is being created, and no errors are being thrown, so I'm at a loss. Any assistance would be appreciated.

1 answer

0 vote

Hi Benjamin,

I have made some tests in the meantime and it seems that Clover integration with Tycho is not so straightforward. The main reason is that Tycho plugin relies on configuration from Eclipse files (build.properties for example) instead of standard Maven settings. As a consequence, when Clover instruments sources in the 'process-sources' build phase and puts them into 'target/src-instrumented' directory, this new source location is being ignored by Tycho plugin, which takes sources from the original location (typically from '<module>/src').

However, there is a workaround possible. Not an ideal solution, but works. Please have a look at this new manual:

In addition, I've raised an improvement request to make this integration seamless in future:

so that you can track progress there.

Regards
Marek

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Thursday in Off-topic

Friday Fun: Magic Eyes

...staring into the background. Once the image pops out in 3D, you can look around the picture and enjoy. If you will see if you are a true illusion master! :) You did it? :) Wow! Awesome! As a bonus...

458 views 83 11
Join discussion

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