ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r888191 - /ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java
Date Mon, 07 Dec 2009 23:37:38 GMT
Author: maartenc
Date: Mon Dec  7 23:37:38 2009
New Revision: 888191

URL: http://svn.apache.org/viewvc?rev=888191&view=rev
Log:
Attempt to fix IVY-1148

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java?rev=888191&r1=888190&r2=888191&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java Mon Dec  7 23:37:38
2009
@@ -853,12 +853,16 @@
                 for (Iterator it = mergedDependencyArtifacts.iterator(); it.hasNext();) {
                     DependencyArtifactDescriptor dad = (DependencyArtifactDescriptor) it.next();
                     Map extraAttributes = new HashMap(dad.getQualifiedExtraAttributes());
-                    // this is later used to know that this is a merged artifact
-                    extraAttributes.put("ivy:merged", 
-                        dad.getDependencyDescriptor().getParentRevisionId() 
-                        + " -> " + usage.getNode().getId()); 
-                    artifacts.add(new MDArtifact(md, dad.getName(), dad.getType(), dad.getExt(),
-                        dad.getUrl(), extraAttributes));
+                    MDArtifact artifact = new MDArtifact(md, dad.getName(), dad.getType(),
dad.getExt(),
+                            dad.getUrl(), extraAttributes);
+                    
+                    if (!artifacts.contains(artifact)) {
+                        // this is later used to know that this is a merged artifact
+                        extraAttributes.put("ivy:merged", 
+                            dad.getDependencyDescriptor().getParentRevisionId() 
+                            + " -> " + usage.getNode().getId()); 
+                        artifacts.add(artifact);
+                    }
                 }
             }
         }



Mime
View raw message