maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From schu...@apache.org
Subject [5/5] maven git commit: [MNG-5988] Dependency mediation should prioritize transitive dependencies based on scope.
Date Wed, 06 Jul 2016 13:35:53 GMT
[MNG-5988] Dependency mediation should prioritize transitive dependencies based on scope.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/6e3008d7
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/6e3008d7
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/6e3008d7

Branch: refs/heads/maven-3.x-next
Commit: 6e3008d7c38a4046e785cf9e882e3e9dc7f2669a
Parents: d69dd31
Author: Christian Schulte <schulte@apache.org>
Authored: Fri Jul 1 16:41:52 2016 +0200
Committer: Christian Schulte <schulte@apache.org>
Committed: Wed Jul 6 15:35:02 2016 +0200

----------------------------------------------------------------------
 .../repository/internal/MavenRepositorySystemUtils.java   | 10 ++--------
 .../apache/maven/plugin/internal/PlexusUtilsInjector.java |  2 +-
 2 files changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/6e3008d7/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java
----------------------------------------------------------------------
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 b0b0a8d..be7d73d 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,12 +39,8 @@ 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.ConflictResolver;
 import org.eclipse.aether.util.graph.transformer.JavaDependencyContextRefiner;
-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.transformer.SimpleOptionalitySelector;
+import org.eclipse.aether.util.graph.transformer.JavaDependencyMediator;
 import org.eclipse.aether.util.graph.traverser.FatArtifactTraverser;
 import org.eclipse.aether.util.repository.SimpleArtifactDescriptorPolicy;
 
@@ -103,9 +99,7 @@ public final class MavenRepositorySystemUtils
                                        new OptionalDependencySelector(), new ExclusionDependencySelector()
);
         session.setDependencySelector( depFilter );
 
-        DependencyGraphTransformer transformer =
-            new ConflictResolver( new NearestVersionSelector(), new JavaScopeSelector(),
-                                  new SimpleOptionalitySelector(), new JavaScopeDeriver()
);
+        DependencyGraphTransformer transformer = new JavaDependencyMediator( JavaDependencyMediator.NO_PRIORITIZATION
);
 
         session.setDependencyGraphTransformer(
             new ChainedDependencyGraphTransformer( transformer, new JavaDependencyContextRefiner()
) );

http://git-wip-us.apache.org/repos/asf/maven/blob/6e3008d7/maven-core/src/main/java/org/apache/maven/plugin/internal/PlexusUtilsInjector.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/PlexusUtilsInjector.java
b/maven-core/src/main/java/org/apache/maven/plugin/internal/PlexusUtilsInjector.java
index 16a0b63..2b30379 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/PlexusUtilsInjector.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/PlexusUtilsInjector.java
@@ -53,7 +53,7 @@ class PlexusUtilsInjector
         if ( findPlexusUtils( node ) == null )
         {
             Artifact pu = new DefaultArtifact( GID, AID, null, EXT, VER );
-            DefaultDependencyNode child = new DefaultDependencyNode( new Dependency( pu,
JavaScopes.RUNTIME ) );
+            DefaultDependencyNode child = new DefaultDependencyNode( node, new Dependency(
pu, JavaScopes.RUNTIME ) );
             child.setRepositories( node.getRepositories() );
             child.setRequestContext( node.getRequestContext() );
             node.getChildren().add( child );


Mime
View raw message