Maven transitive dependencies should be cleaned up
richardatsap opened this issue · comments
It should be considered to clean up the transitive dependencies of the project using dependency exclusions and explicit dependencies on the desired ones.
Run mvn org.basepom.maven::duplicate-finder-maven-plugin:1.4.0:check -Dduplicate-finder.checkCompileClasspath=false -Dduplicate-finder.checkTestClasspath=false
on a project with the pom.xml attached, no further code required.
You'll find a bunch of duplicate classes especially in package javax.persistence.* Note as well that there are clashes with the recommended Eclipselink version which brings its own version of these classes under a different packaging.
All these classes will end up in the packaged war-file, where the loaded class will be put on the class path randomly and it is by sheer luck that it's the correct one. I've been bitten by this in the past and not every consumer is versed in Maven packaging.
Thanks for supporting.
The pom files will be updated with the next release
Dependencies have been cleaned up.