Details
-
Bug
-
Resolution: Won't Fix
-
Medium
-
4.0.4
-
None
-
Severity 2 - Major
Description
In our project, source gets generated through annotation processors (i.e "transparently" through maven-compiler-plugin).
I have seen a couple of bug reports regarding generated sources and Clover, but they all revolved around using the setup goal. I don't think that works in our case, since we want to run clover (incl. check) in "normal" builds.
If I leave includesAllSourceRoots set to false, the compiler re-generates the code, but claims the classes are duplicate (presumably because both target/generated-sources/annotations/ and target/clover/generated-sources/annotations/ are in the source roots.
If I set includesAllSourceRoots to true, I do see that the generated code gets instrumented (thus the .java source for these appear 3 times in target/), and the compiler still complains (it is not explicit about where the duplicates are, but i assume the compiler then uses target/clover/src/ (instrumented) and target/generated-sources/annotations/ (generated before clover kicked in).
I'm sorry if this duplicating other issues, or if there is an existing solution for this. I have found anything.
I'll try to debug myself a bit further and see if I can come up with anything (maybe an IT), but I thought I'd report this, since you seem to be quite responsive here.