Run Clover from a config file I can share between devs in Eclipse and the build in cmd line?

Hi,

We have been running Clover through ant for quite some time now, and it's really not our first choice.  This means that the developers have their eclipse integration and we run a totally separate set of configuration/exclusions.  Frankly, we'd just as soon not use ant anymore here.

What I'd really like is a config file we can have the developers point their Eclipse integration to, and we can point the cmd line execution to during the build.  This means that we have parity, which we do not currently have.

Is there a good way to do this?  The documentation doesn't really seem to have any information about sharing preferences even between developers in Eclipse, never mind outside, which seems odd.  I must be missing something.

Thanks for the help.

Cullen

2 answers

0 votes

Hi Cullen,

In Eclipse workspace you can find Clover settings for a project:

    <eclipse workspace>\<project>\.settings\com.atlassian.clover.eclipse.core.prefs

In Eclipse installation directory you can find global settings for Clover:

    <eclipse dir>\configuration\.settings\com.atlassian.clover.eclipse.core.prefs

 

I think you could share these files among your team.

 

Cheers
Marek

Hi, That is at least something to start with, but how do you use those same settings on command line to replicate what the developers and builds are using, as those should also be in sync? While keeping developers in sync is important, the real problem here is keeping the developers in sync with the build system. Thanks! Cullen

0 votes

I guess you would have to write a task in your build system which would update Eclipse's settings. Please note that these *.prefs files are just properties, thus it should not be hard to generate them. For instance, in *.prefs an inclusion pattern is defined as follows:

include_filter=**/Money*.java

In Ant's <fileset> you can have a reference to an external file containing inclusion patterns - see includesfile / excludesfile attributes. Thus, I can imagine that you could have such external file with pattern which would be:

  • included by <clover-setup>/<fileset> and
  • used as an input to generate *.prefs file.

I think that you can also apply similar approach to other settings as well.

Hi, If I'm following, this means there is no supported connection between what a developer would use for rules, and what the build system would? This seems like a miss. We could certainly do what you are proposing, but would be at the mercy of version compatibility on both ends, along with requiring custom work to get this going. Is there truly no supported solution here? This works fine with something like Maven where the build and developers are running the same pom, but the integration is certainly not as nice with the plugin and any other system. Cullen

There is no automatic synchronization of Clover settings between Clover-for-Ant and Clover-for-Eclipse. Could you please elaborate what do you mean by version compatibility? I'm asking, because all Clover integrations (Ant, Maven, Eclipe, IDEA ...) in given version number are always based on the same Clover core. Thus they are binary compatible. Furthermore, data file formats used by Clover do not change rapidly between versions.

There is a high likelihood that there could be upgrades between versions for developers or on the build system, both of which have the potential to break any custom work that translates the settings between the two. Even if the problem is not frequent, the fact it exists at all is problematic to us.

Are you talking about upgrades of Clover or upgrades of your build system?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

174 views 0 5
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