Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions asciidoc/release-notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ Note, if you have resolved dependencies with version of Ivy prior to 2.6.1, you
- DOCUMENTATION: bla bla bla (jira:IVY-1234[]) (Thanks to Jane Doe)
////

- IMPROVEMENT: switched to using XMLUnit 2.x in tests (jira:IVY-1670[])

== Committers and Contributors

Here is the list of people who have contributed source code and documentation up to this release. Many thanks to all of them, and also to the whole IvyDE community contributing ideas and feedback, and promoting the use of Apache Ivy !
Expand Down
3 changes: 2 additions & 1 deletion ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
<dependency org="org.apache.ant" name="ant-junit" rev="${apache-ant.version}" conf="test" transitive="false"/>
<dependency org="org.apache.ant" name="ant-junit4" rev="${apache-ant.version}" conf="test" transitive="false"/>
<dependency org="ant-contrib" name="ant-contrib" rev="${ant-contrib.version}" conf="test" transitive="false"/>
<dependency org="xmlunit" name="xmlunit" rev="${xmlunit.version}" conf="test" transitive="false"/>
<dependency org="org.xmlunit" name="xmlunit-core" rev="${xmlunit.version}" conf="test" transitive="false"/>
<dependency org="org.xmlunit" name="xmlunit-matchers" rev="${xmlunit.version}" conf="test" transitive="false"/>

<!-- Global excludes -->
<exclude org="junit" module="junit" conf="core,default,httpclient,oro,vfs,sftp,pack200,standalone,ant"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.xmlunit.diff.DefaultNodeMatcher;

import static org.apache.ivy.core.module.descriptor.Configuration.Visibility.PUBLIC;
import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.xmlunit.matchers.CompareMatcher.isSimilarTo;
import static org.xmlunit.diff.ElementSelectors.byNameAndAllAttributes;

public class XmlModuleDescriptorWriterTest {
private static String LICENSE;
Expand Down Expand Up @@ -162,14 +165,15 @@ public void testExtraInfosFromMaven() throws Exception {
XmlModuleDescriptorWriter.write(md, LICENSE, dest);

assertTrue(dest.exists());
String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
.replaceAll("\r\n", "\n").replace('\r', '\n');
String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)));
wrote = wrote.replaceFirst("publication=\"([0-9])*\"", "publication=\"20140429153143\"");
System.out.println(wrote);

String expected = readEntirely("test-write-extrainfo-from-maven.xml").replaceAll("\r\n",
"\n").replace('\r', '\n');
assertXMLEqual(expected, wrote);
String expected = readEntirely("test-write-extrainfo-from-maven.xml");
assertThat(wrote,
isSimilarTo(expected)
.withNodeMatcher(new DefaultNodeMatcher(byNameAndAllAttributes))
.ignoreWhitespace());
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jsch.agentproxy.version=0.0.9
jsch.version=0.1.55
junit.version=4.13.2
oro.version=2.0.8
xmlunit.version=1.6
xmlunit.version=2.12.0