Q: Does Clover work with AspectJ?
Yes. The Clover AspectJ Compiler (CloverAJC) is a wrapper over the
AspectJ compiler (ajc) which instruments sources before they are woven. It is a part of
the OpenClover project, developed in a separate repository and released independently of the main
OpenClover distribution. See Clover AspectJ
Compiler for installation and usage.
Instrumentation breaks my aspects
Clover instrumentation can break compilation of pointcut methods and of code processed by other
bytecode-manipulating frameworks. Note that file exclusion patterns and the
methodContexts filter will not help here: methodContexts
only marks methods in the Clover database so that they can be filtered out of a
report - the code is still instrumented.
To genuinely prevent instrumentation of a piece of code, use inline source directives:
// CLOVER:OFF
... code which must not be instrumented ...
// CLOVER:ON
The scope of these directives is the current file only. See Using Source Directives and Why does Clover instrument classes I have excluded?.