Skip to content

Maven transitive dependencies should be cleaned up #211

Closed
@richardatsap

Description

@richardatsap

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.

pom.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions