maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject [13/15] maven-aether git commit: 453221 represent missing dependencies in dependency tree
Date Sun, 01 May 2016 10:57:11 GMT
453221 represent missing dependencies in dependency tree

Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>


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

Branch: refs/heads/1.0.x
Commit: f31b36ec29136c242556e13a6bb800343655d774
Parents: 0f47b9c
Author: Igor Fedorenko <igor@ifedorenko.com>
Authored: Tue Nov 25 13:17:30 2014 -0500
Committer: Igor Fedorenko <igor@ifedorenko.com>
Committed: Wed Dec 10 08:45:36 2014 -0500

----------------------------------------------------------------------
 .../impl/DefaultDependencyCollector.java        | 20 +++++++++++++++-----
 .../expectedPartialSubtreeOnError.txt           |  7 ++++---
 2 files changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-aether/blob/f31b36ec/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java
----------------------------------------------------------------------
diff --git a/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java
b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java
index 404897c..1bbc61d 100644
--- a/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java
+++ b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java
@@ -447,8 +447,8 @@ public class DefaultDependencyCollector
                         getRemoteRepositories( rangeResult.getRepository( version ), repositories
);
 
                     DefaultDependencyNode child =
-                        createDependencyNode( relocations, preManaged, rangeResult, version,
d, descriptorResult, repos,
-                                              args.request.getRequestContext() );
+                        createDependencyNode( relocations, preManaged, rangeResult, version,
d,
+                                              descriptorResult.getAliases(), repos, args.request.getRequestContext()
);
 
                     node.getChildren().add( child );
 
@@ -460,6 +460,16 @@ public class DefaultDependencyCollector
                     }
                 }
             }
+            else
+            {
+                DependencyNode node = args.nodes.top();
+                List<RemoteRepository> repos =
+                    getRemoteRepositories( rangeResult.getRepository( version ), repositories
);
+                DefaultDependencyNode child =
+                    createDependencyNode( relocations, preManaged, rangeResult, version,
d, null, repos,
+                                          args.request.getRequestContext() );
+                node.getChildren().add( child );
+            }
         }
     }
 
@@ -544,7 +554,7 @@ public class DefaultDependencyCollector
     private static DefaultDependencyNode createDependencyNode( List<Artifact> relocations,
                                                                PremanagedDependency preManaged,
                                                                VersionRangeResult rangeResult,
Version version,
-                                                               Dependency d, ArtifactDescriptorResult
descriptorResult,
+                                                               Dependency d, Collection<Artifact>
aliases,
                                                                List<RemoteRepository>
repos, String requestContext )
     {
         DefaultDependencyNode child = new DefaultDependencyNode( d );
@@ -552,7 +562,7 @@ public class DefaultDependencyCollector
         child.setRelocations( relocations );
         child.setVersionConstraint( rangeResult.getVersionConstraint() );
         child.setVersion( version );
-        child.setAliases( descriptorResult.getAliases() );
+        child.setAliases( aliases );
         child.setRepositories( repos );
         child.setRequestContext( requestContext );
         return child;
@@ -565,7 +575,7 @@ public class DefaultDependencyCollector
                                                                DependencyNode cycleNode )
     {
         DefaultDependencyNode child =
-            createDependencyNode( relocations, preManaged, rangeResult, version, d, descriptorResult,
+            createDependencyNode( relocations, preManaged, rangeResult, version, d, descriptorResult.getAliases(),
                                   cycleNode.getRepositories(), cycleNode.getRequestContext()
);
         child.setChildren( cycleNode.getChildren() );
         return child;

http://git-wip-us.apache.org/repos/asf/maven-aether/blob/f31b36ec/aether-impl/src/test/resources/artifact-descriptions/expectedPartialSubtreeOnError.txt
----------------------------------------------------------------------
diff --git a/aether-impl/src/test/resources/artifact-descriptions/expectedPartialSubtreeOnError.txt
b/aether-impl/src/test/resources/artifact-descriptions/expectedPartialSubtreeOnError.txt
index badca5e..6ef2faf 100644
--- a/aether-impl/src/test/resources/artifact-descriptions/expectedPartialSubtreeOnError.txt
+++ b/aether-impl/src/test/resources/artifact-descriptions/expectedPartialSubtreeOnError.txt
@@ -1,5 +1,6 @@
 subtree:comparison:ext:error
 +- duplicate:transitive:ext:dependency compile
-   +- gid:aid:ext:ver compile
-   |  \- gid:aid2:ext:ver compile
-   \- gid:aid2:ext:ver compile
+|  +- gid:aid:ext:ver compile
+|  |  \- gid:aid2:ext:ver compile
+|  \- gid:aid2:ext:ver compile
+\- git:aid:ext:ver compile


Mime
View raw message