ERROR - Maven - org.apache.maven.plugins.enforcer.BanDuplicateClasses failed with message: Duplicate classes found:


"org.apache.maven.plugins.enforcer.BanDuplicateClasses failed with message:
Duplicate classes found:" while doing Maven install.


There are duplicate files in different dependency jars and there is a rule to ban duplicate classes.


Find the pom file (pom.xml) in the same folder where you executed mvn install.

Find the following tag in the pom xml




             <ignoreClass><Class Name></ignoreClass>


For example


** You can use wild card for all files within a package. Make sure to use . instead of /