Return-Path: Delivered-To: apmail-ant-notifications-archive@locus.apache.org Received: (qmail 88299 invoked from network); 2 Dec 2007 22:27:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Dec 2007 22:27:44 -0000 Received: (qmail 57845 invoked by uid 500); 2 Dec 2007 22:27:33 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 57823 invoked by uid 500); 2 Dec 2007 22:27:33 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 57814 invoked by uid 99); 2 Dec 2007 22:27:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Dec 2007 14:27:32 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Dec 2007 22:27:42 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 27DEB1A9832; Sun, 2 Dec 2007 14:27:21 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r600395 - in /ant/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java test/java/org/apache/ivy/core/resolve/ResolveTest.java Date: Sun, 02 Dec 2007 22:27:20 -0000 To: notifications@ant.apache.org From: xavier@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071202222721.27DEB1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: xavier Date: Sun Dec 2 14:27:19 2007 New Revision: 600395 URL: http://svn.apache.org/viewvc?rev=600395&view=rev Log: FIX: same module appear twice in a circular dependency (IVY-514) (thanks to John Williams) Modified: ant/ivy/core/trunk/CHANGES.txt ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java Modified: ant/ivy/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=600395&r1=600394&r2=600395&view=diff ============================================================================== --- ant/ivy/core/trunk/CHANGES.txt (original) +++ ant/ivy/core/trunk/CHANGES.txt Sun Dec 2 14:27:19 2007 @@ -65,7 +65,7 @@ - IMPROVEMENT: Maven Dependency Management is not used to determine artifact version (IVY-616) (thanks to Jim Bonanno) - IMPROVEMENT: split the cache into an downloaded artifacts cache and a metadata cache (IVY-628) - IMPROVEMENT: add publish triggers to event system (IVY-650) (thanks to Jason Trump) -- IMPROVEMENT: Only display unique circular dependencies during Resolve (IVY-653) +- IMPROVEMENT: Only display unique circular dependencies during Resolve (IVY-653 IVY-514) (with contribution from John Williams) - IMPROVEMENT: Adding option 'cp', which makes it possible for main to be loaded from file (IVY-543) (thanks to Tjeerd Verhagen) - IMPROVEMENT: BasicURLHandler should use method=head for getURLInfo (IVY-611) (thanks to Jim Bonanno) - IMPROVEMENT: artifactproperty should not overwrite the existing properties (IVY-587) Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java?rev=600395&r1=600394&r2=600395&view=diff ============================================================================== --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/circular/CircularDependencyHelper.java Sun Dec 2 14:27:19 2007 @@ -17,8 +17,10 @@ */ package org.apache.ivy.plugins.circular; +import java.util.HashSet; import java.util.Iterator; import java.util.List; +import java.util.Set; import org.apache.ivy.core.module.descriptor.ModuleDescriptor; import org.apache.ivy.core.module.id.ModuleRevisionId; @@ -35,14 +37,21 @@ * * @param descriptors * in order of circular dependency - * @return + * @return a string representation of this circular dependency graph */ public static String formatMessage(final ModuleRevisionId[] mrids) { + Set alreadyAdded = new HashSet(); StringBuffer buff = new StringBuffer(); buff.append(mrids[0]); + alreadyAdded.add(mrids[0]); for (int i = 1; i < mrids.length; i++) { buff.append("->"); - buff.append(mrids[i]); + if (alreadyAdded.add(mrids[i])) { + buff.append(mrids[i]); + } else { + buff.append("..."); + break; + } } return buff.toString(); } Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java?rev=600395&r1=600394&r2=600395&view=diff ============================================================================== --- ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java (original) +++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java Sun Dec 2 14:27:19 2007 @@ -2458,7 +2458,7 @@ fail("no exception with circular dependency strategy set to error"); } catch (CircularDependencyException ex) { assertEquals( - "org6#mod6.3;1.2->org6#mod6.2;1.1->org6#mod6.3;1.2", ex + "org6#mod6.3;1.2->org6#mod6.2;1.1->...", ex .getMessage()); } }