aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2020-01-29 23:03:00 +0100
committerMartin Stockhammer <martin_s@apache.org>2020-01-29 23:03:00 +0100
commit712867584d864d3f7c0ba66ed549342c23b958c3 (patch)
tree5adac3ab9fc78dc81deea090766f201bfd31e738 /archiva-modules
parent3d7c10958965f7cc5ef6b558c9e5fb0a66855a89 (diff)
downloadarchiva-712867584d864d3f7c0ba66ed549342c23b958c3.tar.gz
archiva-712867584d864d3f7c0ba66ed549342c23b958c3.zip
Switching to new xmlunit version
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml9
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurgeTest.java33
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java25
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/pom.xml4
-rw-r--r--archiva-modules/archiva-base/archiva-test-utils/pom.xml4
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-proxy/pom.xml5
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java15
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-repository/pom.xml10
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/metadata/MetadataToolsTest.java19
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/metadata/RepositoryMetadataWriterTest.java5
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml4
-rw-r--r--archiva-modules/archiva-web/archiva-rss/pom.xml4
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/pom.xml4
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedMetadataTestCase.java12
14 files changed, 103 insertions, 50 deletions
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
index eea06dfda..599130f8a 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
@@ -145,8 +145,13 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>xmlunit</groupId>
- <artifactId>xmlunit</artifactId>
+ <groupId>org.xmlunit</groupId>
+ <artifactId>xmlunit-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.xmlunit</groupId>
+ <artifactId>xmlunit-assertj</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurgeTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurgeTest.java
index 156f137cd..76b6ce72d 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurgeTest.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurgeTest.java
@@ -30,11 +30,11 @@ import org.apache.archiva.repository.RepositoryContentFactory;
import org.apache.archiva.repository.RepositoryRegistry;
import org.apache.archiva.metadata.audit.RepositoryListener;
import org.apache.archiva.repository.metadata.base.MetadataTools;
-import org.custommonkey.xmlunit.XMLAssert;
import org.easymock.EasyMock;
import org.junit.Before;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;
+import org.xmlunit.assertj.XmlAssert;
import javax.inject.Inject;
import java.nio.charset.Charset;
@@ -179,12 +179,18 @@ public class CleanupReleasedSnapshotsRepositoryPurgeTest
String expectedVersions =
"<expected><versions><version>2.2</version>" + "<version>2.3</version></versions></expected>";
- XMLAssert.assertXpathEvaluatesTo( "2.3", "//metadata/versioning/release", metadataXml );
- XMLAssert.assertXpathEvaluatesTo( "2.3", "//metadata/versioning/latest", metadataXml );
- System.out.println(metadataXml);
- XMLAssert.assertXpathsEqual( "//expected/versions/version", expectedVersions,
- "//metadata/versioning/versions/version", metadataXml );
- XMLAssert.assertXpathEvaluatesTo( "20070315032817", "//metadata/versioning/lastUpdated", metadataXml );
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/release" ).isEqualTo( "2.3" );
+ // XMLAssert.assertXpathEvaluatesTo( "2.3", "//metadata/versioning/release", metadataXml );
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/latest" ).isEqualTo( "2.3" );
+ // XMLAssert.assertXpathEvaluatesTo( "2.3", "//metadata/versioning/latest", metadataXml );
+ XmlAssert.assertThat( metadataXml ).nodesByXPath( "//metadata/versioning/versions/version" ).hasSize( 2 );
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/versions/version[1]" ).isEqualTo( "2.2" );
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/versions/version[2]" ).isEqualTo( "2.3" );
+
+ // XMLAssert.assertXpathsEqual( "//expected/versions/version", expectedVersions,
+ // "//metadata/versioning/versions/version", metadataXml );
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/lastUpdated" ).isEqualTo( "20070315032817" );
+ // XMLAssert.assertXpathEvaluatesTo( "20070315032817", "//metadata/versioning/lastUpdated", metadataXml );
}
@Test
@@ -377,9 +383,14 @@ public class CleanupReleasedSnapshotsRepositoryPurgeTest
String expectedVersions = "<expected><versions><version>2.0.3-SNAPSHOT</version>"
+ "<version>2.0.4-SNAPSHOT</version></versions></expected>";
- XMLAssert.assertXpathEvaluatesTo( "2.0.4-SNAPSHOT", "//metadata/versioning/latest", metadataXml );
- XMLAssert.assertXpathsEqual( "//expected/versions/version", expectedVersions,
- "//metadata/versioning/versions/version", metadataXml );
- XMLAssert.assertXpathEvaluatesTo( "20070427033345", "//metadata/versioning/lastUpdated", metadataXml );
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/latest" ).isEqualTo( "2.0.4-SNAPSHOT" );
+ // XMLAssert.assertXpathEvaluatesTo( "2.0.4-SNAPSHOT", "//metadata/versioning/latest", metadataXml );
+ XmlAssert.assertThat( metadataXml ).nodesByXPath( "//metadata/versioning/versions/version" ).hasSize( 2 );
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/versions/version[1]" ).isEqualTo( "2.0.3-SNAPSHOT" );
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/versions/version[2]" ).isEqualTo( "2.0.4-SNAPSHOT" );
+ // XMLAssert.assertXpathsEqual( "//expected/versions/version", expectedVersions,
+ // "//metadata/versioning/versions/version", metadataXml );
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/lastUpdated" ).isEqualTo( "20070427033345" );
+ // XMLAssert.assertXpathEvaluatesTo( "20070427033345", "//metadata/versioning/lastUpdated", metadataXml );
}
}
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java
index 453b90bec..3af6a44b3 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java
@@ -30,7 +30,6 @@ import org.apache.archiva.metadata.model.MetadataFacet;
import org.apache.archiva.repository.base.ArchivaRepositoryRegistry;
import org.apache.archiva.repository.RepositoryRegistry;
import org.apache.archiva.repository.features.ArtifactCleanupFeature;
-import org.custommonkey.xmlunit.XMLAssert;
import org.easymock.EasyMock;
import org.junit.After;
import org.junit.Before;
@@ -39,6 +38,7 @@ import org.mockito.ArgumentCaptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.test.context.ContextConfiguration;
+import org.xmlunit.assertj.XmlAssert;
import java.io.IOException;
import java.nio.charset.Charset;
@@ -421,12 +421,9 @@ public class RepositoryPurgeConsumerTest
String metadataXml = org.apache.archiva.common.utils.FileUtils.readFileToString( artifactMetadataFile, Charset.defaultCharset() );
- String expectedVersions = "<expected><versions><version>2.3-SNAPSHOT</version></versions></expected>";
-
- XMLAssert.assertXpathEvaluatesTo( "2.3-SNAPSHOT", "//metadata/versioning/latest", metadataXml );
- XMLAssert.assertXpathsEqual( "//expected/versions/version", expectedVersions,
- "//metadata/versioning/versions/version", metadataXml );
- XMLAssert.assertXpathEvaluatesTo( "20070315032817", "//metadata/versioning/lastUpdated", metadataXml );
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/latest" ).isEqualTo( "2.3-SNAPSHOT" );
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/versions/version" ).isEqualTo( "2.3-SNAPSHOT" );
+ XmlAssert.assertThat(metadataXml).valueByXPath("//metadata/versioning/lastUpdated").isEqualTo ( "20070315032817" );
removeRepoFromConfiguration( "retention-count", repoConfiguration );
}
@@ -492,10 +489,16 @@ public class RepositoryPurgeConsumerTest
String expectedVersions =
"<expected><versions><version>2.2</version>" + "<version>2.3</version></versions></expected>";
- XMLAssert.assertXpathEvaluatesTo( "2.3", "//metadata/versioning/latest", metadataXml );
- XMLAssert.assertXpathsEqual( "//expected/versions/version", expectedVersions,
- "//metadata/versioning/versions/version", metadataXml );
- XMLAssert.assertXpathEvaluatesTo( "20070315032817", "//metadata/versioning/lastUpdated", metadataXml );
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/latest" ).isEqualTo( "2.3" );
+ // XMLAssert.assertXpathEvaluatesTo( "2.3", "//metadata/versioning/latest", metadataXml );
+ XmlAssert.assertThat( metadataXml ).nodesByXPath( "//metadata/versioning/versions/version" ).hasSize( 2 );
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/versions/version[1]" ).isEqualTo( "2.2" );
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/versions/version[2]" ).isEqualTo( "2.3" );
+ // XMLAssert.assertXpathsEqual( "//expected/versions/version", expectedVersions,
+ // "//metadata/versioning/versions/version", metadataXml );
+
+ XmlAssert.assertThat( metadataXml ).valueByXPath( "//metadata/versioning/lastUpdated" ).isEqualTo( "20070315032817" );
+ //XMLAssert.assertXpathEvaluatesTo( "20070315032817", "//metadata/versioning/lastUpdated", metadataXml );
removeRepoFromConfiguration( "days-old", repoConfiguration );
}
diff --git a/archiva-modules/archiva-base/archiva-proxy/pom.xml b/archiva-modules/archiva-base/archiva-proxy/pom.xml
index af604519d..f3edcd0ba 100644
--- a/archiva-modules/archiva-base/archiva-proxy/pom.xml
+++ b/archiva-modules/archiva-base/archiva-proxy/pom.xml
@@ -107,8 +107,8 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>xmlunit</groupId>
- <artifactId>xmlunit</artifactId>
+ <groupId>org.xmlunit</groupId>
+ <artifactId>xmlunit-core</artifactId>
<scope>test</scope>
</dependency>
diff --git a/archiva-modules/archiva-base/archiva-test-utils/pom.xml b/archiva-modules/archiva-base/archiva-test-utils/pom.xml
index 48625be15..7f74abdfa 100644
--- a/archiva-modules/archiva-base/archiva-test-utils/pom.xml
+++ b/archiva-modules/archiva-base/archiva-test-utils/pom.xml
@@ -38,8 +38,8 @@
<artifactId>spring-test</artifactId>
</dependency>
<dependency>
- <groupId>xmlunit</groupId>
- <artifactId>xmlunit</artifactId>
+ <groupId>org.xmlunit</groupId>
+ <artifactId>xmlunit-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/archiva-modules/archiva-maven/archiva-maven-proxy/pom.xml b/archiva-modules/archiva-maven/archiva-maven-proxy/pom.xml
index 9c4599f2b..657cd0f47 100644
--- a/archiva-modules/archiva-maven/archiva-maven-proxy/pom.xml
+++ b/archiva-modules/archiva-maven/archiva-maven-proxy/pom.xml
@@ -79,6 +79,11 @@
<!-- Test scope -->
<dependency>
+ <groupId>org.xmlunit</groupId>
+ <artifactId>xmlunit-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<scope>test</scope>
diff --git a/archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java b/archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java
index 9a4934269..f12a966d0 100644
--- a/archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java
+++ b/archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java
@@ -39,10 +39,13 @@ import org.apache.archiva.repository.storage.FilesystemStorage;
import org.apache.archiva.repository.storage.StorageAsset;
import org.apache.commons.lang3.StringUtils;
import org.apache.maven.wagon.TransferFailedException;
-import org.custommonkey.xmlunit.DetailedDiff;
-import org.custommonkey.xmlunit.Diff;
import org.easymock.EasyMock;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xmlunit.builder.DiffBuilder;
+import org.xmlunit.diff.Diff;
+import org.xmlunit.diff.Difference;
import javax.inject.Inject;
import javax.inject.Named;
@@ -1098,9 +1101,13 @@ public class MetadataTransferTest
ArchivaRepositoryMetadata metadata = MavenMetadataReader.read( actualFileAsset );
RepositoryMetadataWriter.write( metadata, actualContents );
- DetailedDiff detailedDiff = new DetailedDiff( new Diff( expectedMetadataXml, actualContents.toString() ) );
- if ( !detailedDiff.similar() )
+ Diff detailedDiff = DiffBuilder.compare( expectedMetadataXml).withTest( actualContents.toString() ).checkForSimilar().build();
+ if ( detailedDiff.hasDifferences() )
{
+ for ( Difference diff : detailedDiff.getDifferences() )
+ {
+ System.out.println( diff );
+ }
assertEquals( expectedMetadataXml, actualContents );
}
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/pom.xml b/archiva-modules/archiva-maven/archiva-maven-repository/pom.xml
index dac8aff5b..94d7e7f9a 100644
--- a/archiva-modules/archiva-maven/archiva-maven-repository/pom.xml
+++ b/archiva-modules/archiva-maven/archiva-maven-repository/pom.xml
@@ -152,6 +152,16 @@
<!-- Test scope -->
<dependency>
+ <groupId>org.xmlunit</groupId>
+ <artifactId>xmlunit-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.xmlunit</groupId>
+ <artifactId>xmlunit-assertj</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<scope>test</scope>
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/metadata/MetadataToolsTest.java b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/metadata/MetadataToolsTest.java
index e39a3dc69..b9b09db20 100644
--- a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/metadata/MetadataToolsTest.java
+++ b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/metadata/MetadataToolsTest.java
@@ -37,11 +37,12 @@ import org.apache.archiva.repository.metadata.base.MetadataTools;
import org.apache.archiva.repository.maven2.MavenManagedRepository;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
-import org.custommonkey.xmlunit.DetailedDiff;
-import org.custommonkey.xmlunit.Diff;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;
import org.xml.sax.SAXException;
+import org.xmlunit.builder.DiffBuilder;
+import org.xmlunit.diff.Diff;
+import org.xmlunit.diff.Difference;
import javax.inject.Inject;
import javax.inject.Named;
@@ -397,9 +398,12 @@ public class MetadataToolsTest
Path metadataFile = Paths.get( repository.getRepoRoot(), tools.toPath( reference ) );
String actualMetadata = org.apache.archiva.common.utils.FileUtils.readFileToString( metadataFile, Charset.defaultCharset() );
- DetailedDiff detailedDiff = new DetailedDiff( new Diff( expectedMetadata, actualMetadata ) );
- if ( !detailedDiff.similar() )
+ Diff detailedDiff = DiffBuilder.compare( expectedMetadata ).withTest( actualMetadata ).checkForSimilar().build();
+ if ( detailedDiff.hasDifferences() )
{
+ for ( Difference diff : detailedDiff.getDifferences() ) {
+ System.out.println( diff );
+ }
// If it isn't similar, dump the difference.
assertEquals( expectedMetadata, actualMetadata );
}
@@ -412,9 +416,12 @@ public class MetadataToolsTest
Path metadataFile = Paths.get( repository.getRepoRoot(), tools.toPath( reference ) );
String actualMetadata = org.apache.archiva.common.utils.FileUtils.readFileToString( metadataFile, Charset.defaultCharset() );
- DetailedDiff detailedDiff = new DetailedDiff( new Diff( expectedMetadata, actualMetadata ) );
- if ( !detailedDiff.similar() )
+ Diff detailedDiff = DiffBuilder.compare( expectedMetadata ).withTest( actualMetadata ).checkForSimilar().build();
+ if ( detailedDiff.hasDifferences() )
{
+ for ( Difference diff : detailedDiff.getDifferences() ) {
+ System.out.println( diff );
+ }
// If it isn't similar, dump the difference.
assertEquals( expectedMetadata, actualMetadata );
}
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/metadata/RepositoryMetadataWriterTest.java b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/metadata/RepositoryMetadataWriterTest.java
index 304adf2ef..55936edd3 100644
--- a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/metadata/RepositoryMetadataWriterTest.java
+++ b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/metadata/RepositoryMetadataWriterTest.java
@@ -23,7 +23,6 @@ import junit.framework.TestCase;
import org.apache.archiva.model.ArchivaRepositoryMetadata;
import org.apache.archiva.repository.metadata.base.RepositoryMetadataWriter;
import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner;
-import org.custommonkey.xmlunit.XMLAssert;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -32,6 +31,8 @@ import java.nio.charset.Charset;
import java.nio.file.Path;
import java.nio.file.Paths;
+import org.xmlunit.assertj.XmlAssert;
+
/**
* RepositoryMetadataWriterTest
*/
@@ -61,6 +62,6 @@ public class RepositoryMetadataWriterTest
StringWriter actual = new StringWriter();
RepositoryMetadataWriter.write( metadata, actual );
- XMLAssert.assertXMLEqual( "XML Contents", expectedContent, actual.toString() );
+ XmlAssert.assertThat( actual.toString() ).and( expectedContent ).areIdentical();
}
}
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
index 7136293c4..4c9252b90 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
@@ -238,8 +238,8 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>xmlunit</groupId>
- <artifactId>xmlunit</artifactId>
+ <groupId>org.xmlunit</groupId>
+ <artifactId>xmlunit-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/archiva-modules/archiva-web/archiva-rss/pom.xml b/archiva-modules/archiva-web/archiva-rss/pom.xml
index 64a25140c..7d9ab0387 100644
--- a/archiva-modules/archiva-web/archiva-rss/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rss/pom.xml
@@ -57,8 +57,8 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>xmlunit</groupId>
- <artifactId>xmlunit</artifactId>
+ <groupId>org.xmlunit</groupId>
+ <artifactId>xmlunit-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/archiva-modules/archiva-web/archiva-webdav/pom.xml b/archiva-modules/archiva-web/archiva-webdav/pom.xml
index c10f9a033..d13367243 100644
--- a/archiva-modules/archiva-web/archiva-webdav/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/pom.xml
@@ -188,8 +188,8 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>xmlunit</groupId>
- <artifactId>xmlunit</artifactId>
+ <groupId>org.xmlunit</groupId>
+ <artifactId>xmlunit-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedMetadataTestCase.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedMetadataTestCase.java
index 47c5d7ebf..65fc4c61a 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedMetadataTestCase.java
+++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedMetadataTestCase.java
@@ -25,9 +25,10 @@ import com.gargoylesoftware.htmlunit.WebResponse;
import org.apache.archiva.common.utils.FileUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
-import org.custommonkey.xmlunit.DetailedDiff;
-import org.custommonkey.xmlunit.Diff;
import org.junit.Before;
+import org.xmlunit.builder.DiffBuilder;
+import org.xmlunit.diff.Diff;
+import org.xmlunit.diff.Difference;
import java.nio.file.Paths;
@@ -44,9 +45,12 @@ public abstract class AbstractRepositoryServletProxiedMetadataTestCase
protected void assertExpectedMetadata( String expectedMetadata, String actualMetadata )
throws Exception
{
- DetailedDiff detailedDiff = new DetailedDiff( new Diff( expectedMetadata, actualMetadata ) );
- if ( !detailedDiff.similar() )
+ Diff detailedDiff = DiffBuilder.compare( expectedMetadata ).withTest( actualMetadata ).checkForSimilar().build();
+ if ( detailedDiff.hasDifferences() )
{
+ for ( Difference diff : detailedDiff.getDifferences() ) {
+ System.out.println( diff );
+ }
// If it isn't similar, dump the difference.
assertEquals( expectedMetadata, actualMetadata );
}