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

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

Cullen Clark March 12, 2015

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
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 12, 2015

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.

Cullen Clark March 13, 2015

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

Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2015

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.

Cullen Clark March 16, 2015

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.

Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 17, 2015

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

0 votes
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 12, 2015

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

Cullen Clark March 12, 2015

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events