On 28/06/07, Jason van Zyl <[EMAIL PROTECTED]> wrote:
As long as you track this in your proposal and end result amounts to
what this is going to look like in a v4 POM in 2.1 where hopefully
we'll have something nicer like:
<conflictResolvers>
<conflictResolver>x</conflictResolver>
<conflictResolver>y</conflictResolver>
<conflictResolver>z</conflictResolver>
</conflictResolver>
And then in 2.1 if these strategies are employed we can look for the
property and map it into the POM before the build plan is executed.
Even though a graph will be used I don't think the identifiers
describing the strategy would need to change. So if this winds up
getting exposed in the POM lets pick some meaningful understandable
names before you put this in finally as if this goes in the POMs the
ids for the strategies at the very least should remain the same.
That's along the lines that I was thinking. So to summarise, in 2.0.x
we'd use the following syntax:
<properties>
<mavenConflictResolvers>x,y,z</mavenConflictResolvers>
</properties>
Whereas in 2.1.x the property syntax will be supported but deprecated
and we'll use the following preferred syntax:
<conflictResolvers>
<conflictResolver>x</conflictResolver>
<conflictResolver>y</conflictResolver>
<conflictResolver>z</conflictResolver>
</conflictResolver>
Possibly as a child element of <dependencies>.
The currently implemented conflict resolvers are named as follows
(descriptions copied from the Javadoc):
- nearest: Resolves conflicting artifacts by always selecting the
nearest declaration. Nearest is defined as the declaration that has
the least transitive steps away from the project being built.
- farthest: Resolves conflicting artifacts by always selecting the
farthest declaration. Farthest is defined as the declaration that has
the most transitive steps away from the project being built.
- newest: Resolves conflicting artifacts by always selecting the
newest declaration. Newest is defined as the declaration whose version
is greater according to ArtifactVersion.compareTo.
- oldest: Resolves conflicting artifacts by always selecting the
oldest declaration. Oldest is defined as the declaration whose version
is less according to ArtifactVersion.compareTo.
The default is nearest for backwards-compatibility.
If everyone is happy with the MNG-612 branch then I'd like to see it
land on 2.0.x and 2.1.x. See it0125 for an example of it in action.
Once the dust has settled on this discussion I'll wiki it up as
agreed. (Or should the proposal come first? ;)
I've got next week to continue on this and the other dependency tasks
I've been working on, so it'd be good to wrap this all up by then
before I have to move onto other work.
Cheers,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]