I'm trying to package my project using Maven Shade Plugin.
I've configured it in POM xml and run 'package' goal to get executable jar.
When i checked the console after running package goal, I found that I've duplication of the jars in my pom and the shade plugin is keeping just the first dependency and not both.
I tried running it and it fails because of that dependency.
Is there any configuration in Maven shade through which I can keep both the original and duplicate dependency in the executable jar.
TIA
Edit: I've included the console which states duplicate dependency.
[WARNING] maven-shade-plugin has detected that some .class files
[WARNING] are present in two or more JARs. When this happens, only
[WARNING] one single version of the class is copied in the uberjar.
[WARNING] Usually this is not harmful and you can skip these
[WARNING] warnings, otherwise try to manually exclude artifacts
[WARNING] based on mvn dependency:tree -Ddetail=true and the above
I'm trying to create a executable jar from spring+hibernate project
Edit#2: Failure was not because of dependency, it was because I had missed out on transformers for spring resources. However I'm still curious if we can configure Maven Shade to have duplicate classes. Thanks.