When integrating Clover into a build, for example:
the build fails with an error like this:
1) The maven-clover2-plugin is declared in pom, but goals called from a command line have the 'clover' prefix.
2) Neither the clover-maven-plugin is declared in pom.xml nor the <pluginGroup>com.atlassian.maven.plugins</pluginGroup> in .m2/settings.xml and you use goals prefixed with 'clover' from a command line.
Clover plugin for Maven has been renamed in Clover 4.1. Therefore:
- for Clover 3.x.x and Clover 4.0.x the plugin is named com.atlassian.maven.plugins:maven-clover2-plugin and thus goals have the clover2 prefix
- since Clover 4.1.1 the plugin is named com.atlassian.maven.plugins:clover-maven-plugin and thus goals have the clover prefix
1) Declare the com.atlassian.maven.plugins pluginGroup in .m2/settings.xml to ensure that Maven will not try to resolve 'clover' goals to a very old Clover 2.4 (org.apache.maven.plugins:maven-clover-plugin).
2) Upgrade to Clover 4.1.1 or newer and use goals with the 'clover' prefix (e.g. 'mvn clean clover:setup test clover:clover').
3) In case you must stay with Clover older than 4.1.1, use goals with the 'clover2' prefix (e.g. 'mvn clean clover2:setup test clover2:clover').