About
July 23, 2026 ยท View on GitHub
About
Clover Maven Plugin is an OpenClover integration with Maven 3.x and Maven 4.x.
This project is open-source, based on the Apache License version 2.0.
Maven 4 compatibility (since 5.1.0)
-
Use the
clover:setupgoal to instrument your code. It works on both Maven 3 and Maven 4:mvn clover:setup verify clover:clover -
The
clover:instrumentandclover:instrument-testgoals work on Maven 3 only. They fork a build lifecycle and mutate the project model at runtime. Maven 4 treats the project model as immutable during the build, so these mutations no longer reach the plugins running in the forked lifecycle. Instead of silently producing a wrong build, both goals now fail on Maven 4 with a message pointing toclover:setup. -
Repository pollution protection is now enabled by default (
maven.clover.repositoryPollutionProtectionchanged fromfalsetotrue). Becauseclover:setupinstruments sources in the main lifecycle, runninginstallordeploytogether with it would put instrumented classes into your local~/.m2cache or into a binaries repository - such a build now fails with an explanatory message. Run your build up to theverifyphase, or set-Dmaven.clover.repositoryPollutionProtection=falseif installing instrumented artifacts is intentional.
Documentation
Documentation: https://openclover.org/documentation
Issue tracker: https://github.com/openclover/clover/issues
OpenClover home page: https://openclover.org
Developer documentation: https://openclover.org/doc/manual/latest/developer-guide.html
===================================================
Quick setup for developing the plugin
Useful Maven targets:
mvn integration-test -Pintegration-tests,integration-tests-maven3