I am facing similar issue for maven-clover2-plugin version 4.0.0. Here's how we are using the build-helper-maven-plugin
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>add-shared-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>../SomeOtherModule1/src/main/java/com</source>
<source>../SomeOtherModule2/src/main/java/com</source>
<source>../SomeOtherModule3/src/main/java/com</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
and this is how we are using the clover2 plugin in a build profile:
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<version>4.0.0</version>
<configuration combine.self="override">
<targetPercentage>${code_coverage_target}</targetPercentage>
<licenseLocation>${clover_license_location}</licenseLocation>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>instrument-test</goal>
<goal>check</goal>
<goal>clover</goal>
</goals>
</execution>
</executions>
</plugin>
without the clover plugin, the build compiles fine. but after adding the clover plugin, we get several errors saying duplicate classes found.
Am I missing something here ?
Hey Mark,
Yes it does work in initialize phase as follows:
Thanks