简体   繁体   中英

How to use ommited library in java project

I have two libraries as dependencies in my project. Each of those two libraries has bunch of libraries as dependency. However there are two same named libraries with different version, and one of them as I can see in maven pom dependency hierarchy is ommited conflicting with same named one. When I run program program it uses elements of both "parent" libs, but it uses one of conflicting "child" libs whit which it tries to work with "parent" lib which should use other conflicting lib. So is it possible to have both conflicting libs used in project.

Thanks

Not really.

You can use the Maven shade plugin to construct a shaded jar that contains the dependency with a different package hierarchy.

But the usual solution is to try to find a version of the library that works with all of the other stuff (not always possible, I know).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM