When the deploy
target is run, the Clover lifecycle doesn't deploy its artifacts. There is a JIRA issue CLMVN-9 open for this limitation.
As a work around, you can use the build-helper-maven-plugin
as follows:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <id>attach-instrumented-jar</id> <phase>verify</phase> <goals> <goal>attach-artifact</goal> </goals> <configuration> <artifacts> <artifact> <file> ${basedir}/target/clover/${project.artifactId}-${project.version}-clover.jar </file> <type>jar</type> <classifier>clovered</classifier> </artifact> </artifacts> </configuration> </execution> </executions> </plugin>
A subsequent 'mvn deploy' will lead to a deployment of the instrumented jar, the 'Clovered' version as a secondary artifact along with the non-instrumented (original lifecycle's) primary artifact.