gradle-clover-plugin
gradle-clover-plugin copied to clipboard
By default are the instrumented class files used in the war creation or is there somehow a set of non-instrumented class files
I am unsure on how to tell if a class file has been instrumented when looking at it.
Seems like the plugin makes copies of the classes before recompiling with the instrumentation. While the clover instrumentation is occurring you can see the subdirectories under classes are renamed to x-bak and presumably when the clover reporting finishes they are renamed back. My thought is that the war is not containing the instrumented classes and the workflow is correct.
Yes, during testing we temporarily move aside the default compiled classes, instrument all classes and test classes, run unit tests, move back the default compiled classes.
When using the project property that enables the creation of instrumented JAR/WAR files we skip the step that moves the default compiled classes back and make the jar/war tasks run after the test tasks.
As per the documentation this mode is not appropriate for use when building release artifacts. I have not found a better way to generate instrumented JAR/WAR files, it would take a lot of guesswork on the part of the plugin to do something like this.
Ideally an extension could be added which would make the instrumented classes available in an additional output location and then the consumers would create alternate jar/war tasks to assemble instrumented JAR/WAR artifacts.