Maven Clirr plugin is used to give the report of your current project by comparing with another same old project. Basically, if we configured this plugin to your project, it checks your project jar with an older version jar that is configured in pom.xml to compare. This plugin is to compare the source code as well as jar comparisons for incompatible issues to find in the early stage of any module before releasing the module.
If you are releasing any maven module, that module should be well worked with backward compatible with modules that use it. Once the module is released. that module is used by different developers of different teams, if you find any issues after release, then we have to fix that issue rereleasing is the tedious task. To avoid this, It is always a good idea to use clirr plugin execution checks against the previous version to verify compatibility before releasing any your project module. This will specify any binary compatible issues with the previous code.
Adding this plugin is straightforward in pom.xml. we have to add this plugin element in the pluginManagement section of your project’s pom.xml. This is the same process for any new plugin to add to your project.
org.codehaus.mojo is providing the plugin to the maven repository. Once this plugin is configured,clirr-maven-plugin is downloaded into your local repository.
Once you configured the clirr plugin, you have to generate the reports for the compatible issues. This report shows the list of all errors and warnings with detailed messages
if your current project version is 1.2, you need to check with oldest project jar (1.1), then you have to define that version in a comparisonVersion element in the reporting section.
Once plugin configuration and reporting configuration is configured in pom.xml, we have to run maven site command to generate the report.
By running this on the command prompt, This will generate a clirr HTML report under the target/site folder with filename clirr-report.html
Alternatively, you can also run mvn clirr:clirr to generate the report.
Hope you understand the basics of maven clirr plugin with examples.
Please feel to share your comments on this.