diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java index d603638956..3e379f9efb 100644 --- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java +++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java @@ -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.ScopeDependencySelector; 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.JavaEffectiveScopeCalculator; -import org.eclipse.aether.util.graph.transformer.NearestVersionConflictResolver; +import org.eclipse.aether.util.graph.transformer.JavaScopeDeriver; +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.repository.SimpleArtifactDescriptorPolicy; @@ -102,9 +103,8 @@ public final class MavenRepositorySystemUtils session.setDependencySelector( depFilter ); DependencyGraphTransformer transformer = - new ChainedDependencyGraphTransformer( new ConflictMarker(), new JavaEffectiveScopeCalculator(), - new NearestVersionConflictResolver(), - new JavaDependencyContextRefiner() ); + new ConflictResolver( new NearestVersionSelector(), new JavaScopeSelector(), new JavaScopeDeriver() ); + new ChainedDependencyGraphTransformer( transformer, new JavaDependencyContextRefiner() ); session.setDependencyGraphTransformer( transformer ); DefaultArtifactTypeRegistry stereotypes = new DefaultArtifactTypeRegistry(); diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java b/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java index ead1d95d37..d051575b82 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java @@ -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.ScopeDependencySelector; import org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer; -import org.eclipse.aether.util.graph.transformer.NearestVersionConflictResolver; -import org.eclipse.aether.util.graph.transformer.ConflictMarker; +import org.eclipse.aether.util.graph.transformer.ConflictResolver; +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.JavaEffectiveScopeCalculator; +import org.eclipse.aether.util.graph.transformer.NearestVersionSelector; import org.eclipse.aether.util.graph.traverser.FatArtifactTraverser; import org.eclipse.aether.util.repository.SimpleArtifactDescriptorPolicy; @@ -353,9 +354,8 @@ public abstract class AbstractArtifactComponentTestCase session.setDependencySelector( depFilter ); DependencyGraphTransformer transformer = - new ChainedDependencyGraphTransformer( new ConflictMarker(), new JavaEffectiveScopeCalculator(), - new NearestVersionConflictResolver(), - new JavaDependencyContextRefiner() ); + new ConflictResolver( new NearestVersionSelector(), new JavaScopeSelector(), new JavaScopeDeriver() ); + new ChainedDependencyGraphTransformer( transformer, new JavaDependencyContextRefiner() ); session.setDependencyGraphTransformer( transformer ); LocalRepository localRepo = new LocalRepository( localRepository().getBasedir() ); diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java index 0e2ca6494b..54e17265f7 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java @@ -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.ScopeDependencySelector; import org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer; -import org.eclipse.aether.util.graph.transformer.NearestVersionConflictResolver; -import org.eclipse.aether.util.graph.transformer.ConflictMarker; +import org.eclipse.aether.util.graph.transformer.ConflictResolver; +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.JavaEffectiveScopeCalculator; +import org.eclipse.aether.util.graph.transformer.NearestVersionSelector; import org.eclipse.aether.util.graph.traverser.FatArtifactTraverser; import org.eclipse.aether.util.repository.AuthenticationBuilder; import org.eclipse.aether.util.repository.ChainedWorkspaceReader; @@ -456,9 +457,8 @@ public class DefaultMaven session.setDependencySelector( depFilter ); DependencyGraphTransformer transformer = - new ChainedDependencyGraphTransformer( new ConflictMarker(), new JavaEffectiveScopeCalculator(), - new NearestVersionConflictResolver(), - new JavaDependencyContextRefiner() ); + new ConflictResolver( new NearestVersionSelector(), new JavaScopeSelector(), new JavaScopeDeriver() ); + transformer = new ChainedDependencyGraphTransformer( transformer, new JavaDependencyContextRefiner() ); session.setDependencyGraphTransformer( transformer ); session.setTransferListener( request.getTransferListener() );