Error
"org.apache.maven.plugins.enforcer.BanDuplicateClasses failed with message:
Duplicate classes found:" while doing Maven install.
Cause
There are duplicate files in different dependency jars and there is a rule to ban duplicate classes.
Resolution
Find the pom file (pom.xml) in the same folder where you executed mvn install.
Find the following tag in the pom xml
<rules>
<banDuplicateClasses>
</banDuplicateClasses>
</rules>
Add
<ignoreClasses>
<ignoreClass><Class Name></ignoreClass>
</ignoreClasses>
For example
<ignoreClass>junit.framework.*</ignoreClass>
** You can use wild card for all files within a package. Make sure to use . instead of /