mirror of https://github.com/apache/maven.git
Used improved conflict resolver
This commit is contained in:
parent
3df76ee227
commit
3916201b98
|
@ -39,10 +39,11 @@ import org.eclipse.aether.util.graph.selector.ExclusionDependencySelector;
|
||||||
import org.eclipse.aether.util.graph.selector.OptionalDependencySelector;
|
import org.eclipse.aether.util.graph.selector.OptionalDependencySelector;
|
||||||
import org.eclipse.aether.util.graph.selector.ScopeDependencySelector;
|
import org.eclipse.aether.util.graph.selector.ScopeDependencySelector;
|
||||||
import org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
|
import org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
|
||||||
import org.eclipse.aether.util.graph.transformer.ConflictMarker;
|
import org.eclipse.aether.util.graph.transformer.ConflictResolver;
|
||||||
import org.eclipse.aether.util.graph.transformer.JavaDependencyContextRefiner;
|
import org.eclipse.aether.util.graph.transformer.JavaDependencyContextRefiner;
|
||||||
import org.eclipse.aether.util.graph.transformer.JavaEffectiveScopeCalculator;
|
import org.eclipse.aether.util.graph.transformer.JavaScopeDeriver;
|
||||||
import org.eclipse.aether.util.graph.transformer.NearestVersionConflictResolver;
|
import org.eclipse.aether.util.graph.transformer.JavaScopeSelector;
|
||||||
|
import org.eclipse.aether.util.graph.transformer.NearestVersionSelector;
|
||||||
import org.eclipse.aether.util.graph.traverser.FatArtifactTraverser;
|
import org.eclipse.aether.util.graph.traverser.FatArtifactTraverser;
|
||||||
import org.eclipse.aether.util.repository.SimpleArtifactDescriptorPolicy;
|
import org.eclipse.aether.util.repository.SimpleArtifactDescriptorPolicy;
|
||||||
|
|
||||||
|
@ -102,9 +103,8 @@ public final class MavenRepositorySystemUtils
|
||||||
session.setDependencySelector( depFilter );
|
session.setDependencySelector( depFilter );
|
||||||
|
|
||||||
DependencyGraphTransformer transformer =
|
DependencyGraphTransformer transformer =
|
||||||
new ChainedDependencyGraphTransformer( new ConflictMarker(), new JavaEffectiveScopeCalculator(),
|
new ConflictResolver( new NearestVersionSelector(), new JavaScopeSelector(), new JavaScopeDeriver() );
|
||||||
new NearestVersionConflictResolver(),
|
new ChainedDependencyGraphTransformer( transformer, new JavaDependencyContextRefiner() );
|
||||||
new JavaDependencyContextRefiner() );
|
|
||||||
session.setDependencyGraphTransformer( transformer );
|
session.setDependencyGraphTransformer( transformer );
|
||||||
|
|
||||||
DefaultArtifactTypeRegistry stereotypes = new DefaultArtifactTypeRegistry();
|
DefaultArtifactTypeRegistry stereotypes = new DefaultArtifactTypeRegistry();
|
||||||
|
|
|
@ -52,10 +52,11 @@ import org.eclipse.aether.util.graph.selector.ExclusionDependencySelector;
|
||||||
import org.eclipse.aether.util.graph.selector.OptionalDependencySelector;
|
import org.eclipse.aether.util.graph.selector.OptionalDependencySelector;
|
||||||
import org.eclipse.aether.util.graph.selector.ScopeDependencySelector;
|
import org.eclipse.aether.util.graph.selector.ScopeDependencySelector;
|
||||||
import org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
|
import org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
|
||||||
import org.eclipse.aether.util.graph.transformer.NearestVersionConflictResolver;
|
import org.eclipse.aether.util.graph.transformer.ConflictResolver;
|
||||||
import org.eclipse.aether.util.graph.transformer.ConflictMarker;
|
import org.eclipse.aether.util.graph.transformer.JavaScopeDeriver;
|
||||||
|
import org.eclipse.aether.util.graph.transformer.JavaScopeSelector;
|
||||||
import org.eclipse.aether.util.graph.transformer.JavaDependencyContextRefiner;
|
import org.eclipse.aether.util.graph.transformer.JavaDependencyContextRefiner;
|
||||||
import org.eclipse.aether.util.graph.transformer.JavaEffectiveScopeCalculator;
|
import org.eclipse.aether.util.graph.transformer.NearestVersionSelector;
|
||||||
import org.eclipse.aether.util.graph.traverser.FatArtifactTraverser;
|
import org.eclipse.aether.util.graph.traverser.FatArtifactTraverser;
|
||||||
import org.eclipse.aether.util.repository.SimpleArtifactDescriptorPolicy;
|
import org.eclipse.aether.util.repository.SimpleArtifactDescriptorPolicy;
|
||||||
|
|
||||||
|
@ -353,9 +354,8 @@ public abstract class AbstractArtifactComponentTestCase
|
||||||
session.setDependencySelector( depFilter );
|
session.setDependencySelector( depFilter );
|
||||||
|
|
||||||
DependencyGraphTransformer transformer =
|
DependencyGraphTransformer transformer =
|
||||||
new ChainedDependencyGraphTransformer( new ConflictMarker(), new JavaEffectiveScopeCalculator(),
|
new ConflictResolver( new NearestVersionSelector(), new JavaScopeSelector(), new JavaScopeDeriver() );
|
||||||
new NearestVersionConflictResolver(),
|
new ChainedDependencyGraphTransformer( transformer, new JavaDependencyContextRefiner() );
|
||||||
new JavaDependencyContextRefiner() );
|
|
||||||
session.setDependencyGraphTransformer( transformer );
|
session.setDependencyGraphTransformer( transformer );
|
||||||
|
|
||||||
LocalRepository localRepo = new LocalRepository( localRepository().getBasedir() );
|
LocalRepository localRepo = new LocalRepository( localRepository().getBasedir() );
|
||||||
|
|
|
@ -93,10 +93,11 @@ import org.eclipse.aether.util.graph.selector.ExclusionDependencySelector;
|
||||||
import org.eclipse.aether.util.graph.selector.OptionalDependencySelector;
|
import org.eclipse.aether.util.graph.selector.OptionalDependencySelector;
|
||||||
import org.eclipse.aether.util.graph.selector.ScopeDependencySelector;
|
import org.eclipse.aether.util.graph.selector.ScopeDependencySelector;
|
||||||
import org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
|
import org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
|
||||||
import org.eclipse.aether.util.graph.transformer.NearestVersionConflictResolver;
|
import org.eclipse.aether.util.graph.transformer.ConflictResolver;
|
||||||
import org.eclipse.aether.util.graph.transformer.ConflictMarker;
|
import org.eclipse.aether.util.graph.transformer.JavaScopeDeriver;
|
||||||
|
import org.eclipse.aether.util.graph.transformer.JavaScopeSelector;
|
||||||
import org.eclipse.aether.util.graph.transformer.JavaDependencyContextRefiner;
|
import org.eclipse.aether.util.graph.transformer.JavaDependencyContextRefiner;
|
||||||
import org.eclipse.aether.util.graph.transformer.JavaEffectiveScopeCalculator;
|
import org.eclipse.aether.util.graph.transformer.NearestVersionSelector;
|
||||||
import org.eclipse.aether.util.graph.traverser.FatArtifactTraverser;
|
import org.eclipse.aether.util.graph.traverser.FatArtifactTraverser;
|
||||||
import org.eclipse.aether.util.repository.AuthenticationBuilder;
|
import org.eclipse.aether.util.repository.AuthenticationBuilder;
|
||||||
import org.eclipse.aether.util.repository.ChainedWorkspaceReader;
|
import org.eclipse.aether.util.repository.ChainedWorkspaceReader;
|
||||||
|
@ -456,9 +457,8 @@ public class DefaultMaven
|
||||||
session.setDependencySelector( depFilter );
|
session.setDependencySelector( depFilter );
|
||||||
|
|
||||||
DependencyGraphTransformer transformer =
|
DependencyGraphTransformer transformer =
|
||||||
new ChainedDependencyGraphTransformer( new ConflictMarker(), new JavaEffectiveScopeCalculator(),
|
new ConflictResolver( new NearestVersionSelector(), new JavaScopeSelector(), new JavaScopeDeriver() );
|
||||||
new NearestVersionConflictResolver(),
|
transformer = new ChainedDependencyGraphTransformer( transformer, new JavaDependencyContextRefiner() );
|
||||||
new JavaDependencyContextRefiner() );
|
|
||||||
session.setDependencyGraphTransformer( transformer );
|
session.setDependencyGraphTransformer( transformer );
|
||||||
|
|
||||||
session.setTransferListener( request.getTransferListener() );
|
session.setTransferListener( request.getTransferListener() );
|
||||||
|
|
Loading…
Reference in New Issue