Maarten, I've found the problem. ArtifactDownloadReport.hashCode() is not sufficiently consistent with equals(), so we were getting duplicates inserted into the HashSet when we shouldn't have. If I make hashCode() return 1, it works. Now we just have to figure out what an appropriate hashCode() method would look like. I will open a JIRA issue.
Thanks, Carlton > -----Original Message----- > From: Maarten Coene [mailto:[email protected]] > Sent: Thursday, December 03, 2009 5:09 PM > To: [email protected] > Subject: Re: Multiple artifacts error for modules that don't have > multiple artifacts > > Carlton, > > could you open a JIRA issue for this and attach (if possible) a simple > example so we can easily reproduce the problem (I've made a few > attempts, but I failed to reproduce the problem) > > Maarten > > > > > ----- Original Message ---- > From: Carlton Brown <[email protected]> > To: [email protected] > Sent: Thu, December 3, 2009 8:21:59 PM > Subject: RE: Multiple artifacts error for modules that don't have > multiple artifacts > > > -----Original Message----- > > From: Carlton Brown [mailto:[email protected]] > > Sent: Thursday, December 03, 2009 6:26 AM > > To: [email protected] > > Subject: Multiple artifacts error for modules that don't have > multiple > > artifacts > > > > I've got a very annoying Ivy issue where I get the error " Multiple > > artifacts of the module [whatever] are retrieved to the same file!" > > This is for an internally published module which I know for a fact > does > > not have more than just a vanilla jar file. > > I looked through the code, and what I found is that in > RetrieveEngine.determineArtifactsToCopy, where it builds a map of > retrieval conflicts, the same artifact is getting inserted twice in the > conflict map for the same revision. I don't believe this is correct. > > This happens because one of the artifacts has an extra "qualified > attribute" called 'merged', which the other artifact does not have. > Since AbstractArtifact.equals() considers artifacts unequal if any of > the qualified attributes are different, the artifacts are considered > unequal and it causes a collision in > RetrieveEngine.determineArtifactsToCopy. > > I am not sure the purpose of the 'merged' attribute, but should it > really determine equality of artifacts for retrieval? I don't think > it > should, but I'm not an expert. Xavier? Anyone? > > Thanks, > Carlton > > > ***CONFIDENTIALITY NOTICE and DISCLAIMER*** > This message and any attachment are confidential and may be > privileged or otherwise protected from disclosure and solely for > the use of the person(s) or entity to whom it is intended. If you > have received this message in error and are not the intended > recipient, please notify the sender immediately and delete this > message and any attachment from your system. If you are not the > intended recipient, be advised that any use of this message is > prohibited and may be unlawful, and you must not copy this > message or attachment or disclose the contents to any other person. > > > > ***CONFIDENTIALITY NOTICE and DISCLAIMER*** This message and any attachment are confidential and may be privileged or otherwise protected from disclosure and solely for the use of the person(s) or entity to whom it is intended. If you have received this message in error and are not the intended recipient, please notify the sender immediately and delete this message and any attachment from your system. If you are not the intended recipient, be advised that any use of this message is prohibited and may be unlawful, and you must not copy this message or attachment or disclose the contents to any other person.
