0

I can use Maven + Clover to generate code coverage report (in target\site\clover). But I found the instrumented classes is in target\classes, could I move it to other directory?

The reason is that Maven will package all target\classes into final jar but I don't need it in my jar. Another reason is we want to run FindBug and it will analyze target\classes.

Maven goal is "clean clover2:setup install clover2:aggregate clover2:clover"

I found one similar question but it's for Ant and I use Maven. Changing location of Clover instrumented classes

Community
  • 1
  • 1
Dennys
  • 587
  • 2
  • 13
  • 33

1 Answers1

1

You can use clover2:instrument instead of clover2:setup. The clover2:instrument goal will fork a parallel build life cycle and in that cycle all artifacts produced (generated sources, classes, junit results etc) will be placed in /target/clover instead of /target directory. This should give you separation you need.

Marek
  • 748
  • 6
  • 13
  • Thanks, but when I change to use clover2:instrument, the classes is in another directory, but the cross module JUnit doesn't count in Clover report anymore. Is it correct ? – Dennys Nov 06 '13 at 03:36
  • Probably not. But I cannot tell it without seeing your project structure, module dependencies and build logs. Raise a support ticket on support.atlassian.com if necessary. – Marek Nov 06 '13 at 10:15