Use a dependencyManagement section in order to declare the versions we
really need.

Create intermediary jars using shade in cases we really need both versions
of the same jar

Use the DOES-NOT-EXIST trick
<http://day-to-day-stuff.blogspot.com.co/2007/10/announcement-version-99-does-not-exist.html>
for dependencies meant to completely wipe

--
-- Aldrin Leal, <[email protected]> / http://about.me/aldrinleal

On Fri, Apr 22, 2016 at 1:23 PM, Kevin Burton <[email protected]> wrote:

> We have a rather complex classpath in our app... sometimes maven computes
> the wrong classpath because one package changes classpath order and has a
> dependency on an earlier jar.
>
> To avoid this we usually analyze our classpath between builds and our
> builds break if a classpath change isn't approved.
>
> One of the BIG problems here is when we get overlapping classes.
>
> Right now this is happening with joda time and joda convert.  WE have about
> 10 classes that are in both .jars.
>
> First. It seems irresponsible for project maintainers to release artifacts
> like this. If there are shared .classes just publish a new -core artifact.
>
> Just being pragmatic.. I'm not sure the BEST way to handle this.
>
> One strategy is to make sure that each lib is the LATEST .. but sometimes
> that's not possible.
>
> How do you guys handle this?
>
> --
>
> We’re hiring if you know of any awesome Java Devops or Linux Operations
> Engineers!
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
>

Reply via email to