logArtifacts("before changes");
// Instrument both the main sources and the test sources if the user has configured it
final MainInstrumenter mainInstrumenter = new MainInstrumenter(this, cloverOutputSourceDirectory);
final TestInstrumenter testInstrumenter = new TestInstrumenter(this, cloverOutputTestSourceDirectory);
if (isJavaProject()) {
mainInstrumenter.instrument();
if (this.includesTestSourceRoots) {
testInstrumenter.instrument();
}
}
// add clover.jar to classpath
addCloverDependencyToCompileClasspath();
// deal with '-clover' artifacts in dependencies
swizzleCloverDependencies();
// Modify Maven model so that it points to the new source directories and to the clovered
// artifacts instead of the original values.
final String originalSrcDir = mainInstrumenter.redirectSourceDirectories();
originalSrcMap.put(getProject().getId(), originalSrcDir);
if (this.includesTestSourceRoots) {
final String originalSrcTestDir = testInstrumenter.redirectSourceDirectories();
originalSrcTestMap.put(getProject().getId(), originalSrcTestDir);
}
// add instrumentation of groovy sources
injectGrover(outDir);