I agree that a global relocations.xml would not scale.
You can't change the old (5.1.0) pom,
so the most obvious place is simply adding this meta-data in the new pom (5.2.0):

<groupId>org.drools.guvnor</groupId>
<artifactId>guvnor-repository</artifactId>
<version>5.2.0</version>

<legacy-identifications>
<legacy-identification>
<groupId>org.drools</groupId>
<artifactId>drools-repository</artifactId>
<legacy-identification>
</legacy-identifications>

Then maven knows that guvnor-repository conflicts with drools-repository.

Exclusions are a mess, in my opinion they are evil (even though I use them myself). Here's why: you add an exclusion today (after getting hurt because you didn't)
- because of dependency bar forget to declare X as optional
- because you don't want the transitive dependency drools-repository, because you got the newer guvnor-repository
but tomorrow, when you upgrade to the next version of bar,
you don't touch the exclusions because if you remove one and the build succeeds, it might still be luck (because the classpath order puts guvnor-repository 5.2.0 first on your machine). So you leave the exclusions in there... even though they might not be needed any more.

A couple of years down the line and you get a build pom.xml like ours :)

Op 18-01-11 18:32, Wayne Fay schreef:
There should be some support for changing the GA.
Getting it right immediately, forever in the beginning is not realistic.
But how would you implement this? The only way I can think off the top
of my head is a global relocations.xml that is stored in Central and
is somehow used to manage these moves. But that gets ugly very
quickly. And no one really wants to manage that file.

No, I think the current approach is the most sane one. People using
Maven for their builds should be expected to know what their
dependencies (including transitives) are, and manage these kinds of
changes with exclusions etc.

Wayne

--
With kind regards,
Geoffrey De Smet



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to