Clover Documentation

Clover 3.1 Documentation
Clover 3.0 Documentation
Clover 2.6 Documentation
More...

Clover Knowledge Base Resources

Skip to end of metadata
Go to start of metadata

Symptoms

When integrating clover into your build, the build fails with duplicate class errors:

Cause

The jaxws-maven-plugin adds the output directory for the generated sources to the compile source roots. Clover changes the ${project.build.sourceDirectory} to target/clover/src-instrumented when it performs the instrumentation, thus maven ends up having both the original generated code and the instrumented code on the compile path.

Resolution

Configure the jaxws-maven-plugin to use ${project.build.sourceDirectory} as the <sourceDestDirectory>.