michael-o commented on a change in pull request #158:
URL: https://github.com/apache/maven-resolver/pull/158#discussion_r821489218



##########
File path: 
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java
##########
@@ -500,15 +505,19 @@ private void doRecurse( Args args, 
DependencyProcessingContext parentContext,
         List<DependencyNode> children = args.pool.getChildren( key );
         if ( children == null )
         {
-            args.pool.putChildren( key, child.getChildren() );
-
             List<DependencyNode> parents = new ArrayList<>( 
parentContext.parents );
-            parents.add( child );
-            for ( Dependency dependency : descriptorResult.getDependencies() )
+            boolean skipResolve = args.skipper.skipResolution( child, parents 
);

Review comment:
       Leftover: `skipResolution`

##########
File path: 
maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollectorTest.java
##########
@@ -101,6 +102,12 @@ private Dependency newDep( String coords, String scope )
         return new Dependency( new DefaultArtifact( coords ), scope );
     }
 
+    private Dependency newDep( String coords, String scope, 
Collection<Exclusion> exclusions )
+    {
+        Dependency d = new Dependency( new DefaultArtifact( coords ), scope );
+        return d.setExclusions(exclusions);
+    }
+

Review comment:
       Please reformat

##########
File path: 
maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollectorTest.java
##########
@@ -222,6 +229,26 @@ public void testMissingDependencyDescription()
         }
     }
 
+    @Test
+    public void testExclusion1()
+            throws DependencyCollectionException {
+        collector.setArtifactDescriptorReader(newReader("managed/"));
+        parser = new DependencyGraphParser("artifact-descriptions/managed/");
+        session.setDependencyManager(new TransitiveDependencyManager());
+
+        ExclusionDependencySelector exclSel1 = new 
ExclusionDependencySelector();
+        session.setDependencySelector(exclSel1);
+
+        Dependency root1 = newDep("gid:root:ext:ver", "compile", 
Collections.singleton(new Exclusion("gid", "transitive-1", "", "ext")));
+        Dependency root2 = newDep("gid:root:ext:ver", "compile", 
Collections.singleton(new Exclusion("gid", "transitive-2", "", "ext")));
+        List<Dependency> dependencies = Arrays.asList(root1, root2);
+        CollectRequest request = new CollectRequest(dependencies, null, 
Arrays.asList(repository));
+        
request.addManagedDependency(newDep("gid:direct:ext:managed-by-dominant-request"));
+        request.addManagedDependency( newDep( 
"gid:transitive-1:ext:managed-by-root" ) );
+        CollectResult result = collector.collectDependencies(session, request);
+        System.err.println(result);
+    }

Review comment:
       Please reformat




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to