Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 48664 invoked from network); 6 Jul 2010 21:47:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Jul 2010 21:47:07 -0000 Received: (qmail 69127 invoked by uid 500); 6 Jul 2010 21:47:07 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 69047 invoked by uid 500); 6 Jul 2010 21:47:06 -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 69040 invoked by uid 99); 6 Jul 2010 21:47:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jul 2010 21:47:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jul 2010 21:47:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D9D8723889B6; Tue, 6 Jul 2010 21:45:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r961022 - in /ant/ivy/core/branches/2.2.x: ./ src/java/org/apache/ivy/plugins/parser/xml/ test/java/org/apache/ivy/plugins/parser/xml/ Date: Tue, 06 Jul 2010 21:45:40 -0000 To: notifications@ant.apache.org From: maartenc@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100706214540.D9D8723889B6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: maartenc Date: Tue Jul 6 21:45:40 2010 New Revision: 961022 URL: http://svn.apache.org/viewvc?rev=961022&view=rev Log: Merged fix for IVY-1203 into the 2.2.x branch. Added: ant/ivy/core/branches/2.2.x/test/java/org/apache/ivy/plugins/parser/xml/test-write-extends.xml - copied unchanged from r961020, ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-write-extends.xml Modified: ant/ivy/core/branches/2.2.x/ (props changed) ant/ivy/core/branches/2.2.x/CHANGES.txt ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java ant/ivy/core/branches/2.2.x/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java Propchange: ant/ivy/core/branches/2.2.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Jul 6 21:45:40 2010 @@ -1,4 +1,4 @@ /ant/ivy/core/branches/2.0.0:727187-727188,727520-732505 /ant/ivy/core/branches/2.0.0-rc2:707459-708717 /ant/ivy/core/branches/2.0.x:696803-698317 -/ant/ivy/core/trunk:695737,696014-696031,696442,958415-958693 +/ant/ivy/core/trunk:695737,696014-696031,696442,958415-958693,961017-961020 Modified: ant/ivy/core/branches/2.2.x/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.2.x/CHANGES.txt?rev=961022&r1=961021&r2=961022&view=diff ============================================================================== --- ant/ivy/core/branches/2.2.x/CHANGES.txt (original) +++ ant/ivy/core/branches/2.2.x/CHANGES.txt Tue Jul 6 21:45:40 2010 @@ -106,6 +106,10 @@ for detailed view of each issue, please Jaroslaw Wypychowski Aleksey Zhukov + 2.2.0 +===================================== +- FIX: Ivy info/extends/extendsType attribute is misspelled by XmlModuleDescriptorWriter (IVY-1203) (thanks to Jason Trump) + 2.2.0-rc1 ===================================== - DOCUMENTATION: Limit the width of running text in documentation (IVY-1030) Modified: ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java?rev=961022&r1=961021&r2=961022&view=diff ============================================================================== --- ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java (original) +++ ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java Tue Jul 6 21:45:40 2010 @@ -476,7 +476,7 @@ public final class XmlModuleDescriptorWr if (location != null) { out.print(" location=\"" + XMLHelper.escape(location) + "\""); } - out.print(" extendTypes=\"" + StringUtils.join(parent.getExtendsTypes(), ",") + "\""); + out.print(" extendType=\"" + StringUtils.join(parent.getExtendsTypes(), ",") + "\""); out.println("/>"); } License[] licenses = md.getLicenses(); Modified: ant/ivy/core/branches/2.2.x/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.2.x/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java?rev=961022&r1=961021&r2=961022&view=diff ============================================================================== --- ant/ivy/core/branches/2.2.x/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java (original) +++ ant/ivy/core/branches/2.2.x/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java Tue Jul 6 21:45:40 2010 @@ -26,6 +26,7 @@ import java.util.GregorianCalendar; import junit.framework.TestCase; +import org.apache.ivy.Ivy; import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor; import org.apache.ivy.core.module.descriptor.ModuleDescriptor; import org.apache.ivy.core.module.id.ModuleRevisionId; @@ -106,6 +107,20 @@ public class XmlModuleDescriptorWriterTe assertEquals(expected, wrote); } + public void testExtends() throws Exception { + ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor( + new IvySettings(), XmlModuleDescriptorWriterTest.class.getResource("test-extends-all.xml"), false); + XmlModuleDescriptorWriter.write(md, LICENSE, dest); + + assertTrue(dest.exists()); + String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest))) + .replaceAll("\r\n?", "\n"); + String expected = readEntirely("test-write-extends.xml") + .replaceAll("\r\n?", "\n") + .replaceAll("working@localhost", Ivy.getWorkingRevision()); + assertEquals(expected, wrote); + } + private String readEntirely(String resource) throws IOException { return FileUtil.readEntirely(new BufferedReader(new InputStreamReader( XmlModuleDescriptorWriterTest.class.getResource(resource).openStream())));