I only need instrumented classes for unit testing and I don't want to risk publishing them to my production environment. How can I do this with Clover?

Q: I only need instrumented classes for unit testing and I don't want to risk publishing them to my production environment. How can I do this with Clover? Clover supports writing both instrumented and uninstrumented class files to different directories during a build.
To enable the feature, right click on your project and select properties, select Clover, select Compilation tab, select "User specified folder" and then select a project directory where you wish instrumented classes.

All your other Eclipse plugins will then pick up uninstrumented class files from your normal output folder(s) but instrumented classes will also be available for unit testing. The trick, though, is to ensure your JUnit or TestNG launch configuration can see the instrumented classes before your uninstrumented ones. To do this, you will need to modify the classpath of your JUnit launch configuration so that under User Entries the folder containing instrumented classes is *before* the regular output folder for your project.