Le samedi 10 novembre 2012 19:15:47 Karl Heinz Marbaise a écrit :
> Hi Hervè,
> 
> many for the explanation...
> 
>  > yes, the behaviour is known - probably not from many people, but I do
> 
> know it
> 
> > was a consequence of maven-dependency-tree-2.0 MSHARED-167
> > 
> > I wouldn't say "intentional", but that's a consequence of using Aether in
> > Maven 3 instead of tracking internal Maven 2 dependency resolution events.
> > 
> > Maven 3/Aether has totally changed the dependency resolution algorithm,
> > and
> > such resolution info is not available to Maven core any more. When
> > Benjamin
> > worked on Aether, he gabve some info on this topic, with the global
> > algorithm change that would not give such info even with Aether, but I
> > didn't really understand nor investigated at that time.
> > 
> > Notice that I'm sure that it has to do with "conflict resolution" needed
> > for MNG-3092, so I should work on it and learn what I still didn't
> > understand for the moment. I hope that when I understand the conflict
> > resolution algorithm and code, I'll be able to find a way to track this
> > info and report it to m- dependency-p.
> 
> Based on the changes i see that the documentation on the web-sites don't
> show the current state of Maven 3 (or to be more accurate of the
> maven-depenency-plugin)...in particular this page:
> http://maven.apache.org/plugins/maven-dependency-plugin/examples/resolving-c
> onflicts-using-the-dependency-tree.html
> 
> So the question is: Should the site be updated and show the current
> state with the consequence of being asked by users where to get the
> needed information of the dependencies (omit conflict.. etc.) ?
yes, it should. But this will require a new version: if we can add the feature 
back, this will be better :)

> 
> > I'm open to any help on this topic, since I know it won't be easy :)
> 
> may be you can give me some pointers where to start reading and diving
> into this problem...may be i can offer some helper (after some time of
> reading ;-))...
I just wrote something on maven-dependency-tree: then the starting point here 
is Maven3DependencyGraphBuilder
Then my initial search show that the conflict resolution algorithm is in maven-
aether-provider's MavenRepositorySystemSession:
        DependencyGraphTransformer transformer =
            new ChainedDependencyGraphTransformer( new ConflictMarker(), new 
JavaEffectiveScopeCalculator(), new NearestVersionConflictResolver(), new 
JavaDependencyContextRefiner() );

and our problem is that NearestVersionConflictResolver simply prunes 
conflicting 
dependencies, instead of marking them "omitted for conflict"
I still didn't study how to change that (and how do do this in maven-
dependency-tree without changing Maven core: that one should be feasible by 
cloning the repository system session and changing the transformer)

> 
> Kind regards
> Karl-Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to