From 94aae6cced13aa712decbfb39688e6e37267aaba Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 29 Nov 2018 12:06:44 +0000 Subject: [PATCH 01/19] Switch to SHA512 sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index d4e13e8..2132d48 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e69b85b1b386b5027e30053eaaf591a3 xmlunit-1.6-src.zip +SHA512 (xmlunit-1.6-src.zip) = a7d15905d959ab5bfeb1807c80eab3e0aa58d501a2136335961da842b9571b95b4aab18189e9a21e59afac960ea83f9a2d32e3af398f63c0f839587b60b9f96b From a2b25602817f0f364c34a7519b8ca8fd8044b0b2 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 29 Nov 2018 13:02:12 +0000 Subject: [PATCH 02/19] Remove explicit Epoch --- xmlunit.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/xmlunit.spec b/xmlunit.spec index 3cace5c..f725502 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -31,7 +31,6 @@ Name: xmlunit Version: 1.6 Release: 7%{?dist} -Epoch: 0 Summary: Provides classes to do asserts on xml License: BSD Source0: http://downloads.sourceforge.net/xmlunit/xmlunit-1.6-src.zip From 4a42e76cc28136f70fd77bb543054345bad46ea9 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 27 Mar 2019 13:35:23 +0100 Subject: [PATCH 03/19] Update to upstream version 2.6.2 --- .gitignore | 1 + sources | 2 +- xmlunit-1.0.pom | 6 --- xmlunit.spec | 108 +++++++++++++++++++++++++++++------------------- 4 files changed, 68 insertions(+), 49 deletions(-) delete mode 100644 xmlunit-1.0.pom diff --git a/.gitignore b/.gitignore index f129c9f..937380e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ xmlunit-1.3-src.zip /xmlunit-1.4-src.zip /xmlunit-1.5-src.zip /xmlunit-1.6-src.zip +/xmlunit-2.6.2-src.tar.gz diff --git a/sources b/sources index 2132d48..98f45df 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xmlunit-1.6-src.zip) = a7d15905d959ab5bfeb1807c80eab3e0aa58d501a2136335961da842b9571b95b4aab18189e9a21e59afac960ea83f9a2d32e3af398f63c0f839587b60b9f96b +SHA512 (xmlunit-2.6.2-src.tar.gz) = 7e71626e604f475e0dffaabf814a81e0d2a6fd43790e2371858c815c676d5b3d6e9f285f98d817ff1b41a81323441bdadb56b8d172419f5546ff6ffc1f7ace7c diff --git a/xmlunit-1.0.pom b/xmlunit-1.0.pom deleted file mode 100644 index c5aa039..0000000 --- a/xmlunit-1.0.pom +++ /dev/null @@ -1,6 +0,0 @@ - - 4.0.0 - xmlunit - xmlunit - 1.0 - \ No newline at end of file diff --git a/xmlunit.spec b/xmlunit.spec index f725502..fd49cf2 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -29,32 +29,30 @@ # Name: xmlunit -Version: 1.6 -Release: 7%{?dist} +Version: 2.6.2 +Release: 1%{?dist} Summary: Provides classes to do asserts on xml -License: BSD -Source0: http://downloads.sourceforge.net/xmlunit/xmlunit-1.6-src.zip -Source1: http://repo1.maven.org/maven2/xmlunit/xmlunit/1.0/xmlunit-1.0.pom -URL: http://xmlunit.sourceforge.net/ -BuildRequires: javapackages-local -BuildRequires: ant -BuildRequires: ant-junit -BuildRequires: junit -BuildRequires: xalan-j2 -BuildRequires: xerces-j2 -BuildRequires: xml-commons-apis +License: ASL 2.0 +Source0: https://github.com/xmlunit/xmlunit/releases/download/v%{version}/%{name}-%{version}-src.tar.gz +URL: https://www.xmlunit.org/ -Requires: junit -Requires: xalan-j2 -Requires: xml-commons-apis +Patch0: 0001-Disable-tests-requiring-network-access.patch + +BuildRequires: maven-local +BuildRequires: mvn(junit:junit) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin) +BuildRequires: mvn(org.assertj:assertj-core) +BuildRequires: mvn(org.hamcrest:hamcrest-core) +BuildRequires: mvn(org.hamcrest:hamcrest-library) +BuildRequires: mvn(org.mockito:mockito-core) BuildArch: noarch %description -XMLUnit extends JUnit to simplify unit testing of XML. It compares a control -XML document to a test document or the result of a transformation, validates -documents against a DTD, and (from v0.5) compares the results of XPath -expressions. +XMLUnit provides you with the tools to verify the XML you emit is the one you +want to create. It provides helpers to validate against an XML Schema, assert +the values of XPath queries or compare XML documents against expected outcomes. %package javadoc Summary: Javadoc for %{name} @@ -62,41 +60,67 @@ Summary: Javadoc for %{name} %description javadoc Javadoc for %{name} +%package assertj +Summary: Assertj for %{name} + +%description assertj +This package provides %{summary}. + +%package core +Summary: Core package for %{name} + +%description core +This package provides %{summary}. + +%package legacy +Summary: Legacy package for %{name} + +%description legacy +This package provides %{summary}. + +%package matchers +Summary: Matchers for %{name} + +%description matchers +This package provides %{summary}. + +%package placeholders +Summary: Placeholders for %{name} + +%description placeholders +This package provides %{summary}. + %prep -%setup -q +%setup -q -n %{name}-%{version}-src -sed -i /java.class.path/d build.xml -# remove all binary libs and javadocs -find . -name "*.jar" -exec rm -f {} \; -rm -rf doc +%patch0 -p1 -#Fix wrong-file-end-of-line-encoding -sed -i 's/\r//g' README.txt LICENSE.txt +%pom_remove_plugin org.codehaus.mojo:buildnumber-maven-plugin +%pom_remove_plugin :maven-assembly-plugin -%mvn_file : %{name} +%mvn_alias "org.xmlunit:xmlunit-legacy" "xmlunit:xmlunit" %build -ant -Dbuild.compiler=modern -Dhaltonfailure=yes \ - -Djunit.lib=$(build-classpath junit) \ - -Dxmlxsl.lib= -Dtest.report.dir=test \ - -Ddb5.xsl=%{_datadir}/sgml/docbook/xsl-ns-stylesheets \ - jar javadocs - -%mvn_artifact %{SOURCE1} build/lib/%{name}-%{version}.jar +%mvn_build -s %install -%mvn_install -J build/doc/api/ +%mvn_install -%check -ant - - -%files -f .mfiles -%doc README.txt LICENSE.txt userguide/XMLUnit-Java.pdf +%files -f .mfiles-xmlunit-parent +%doc README.md CONTRIBUTING.md RELEASE_NOTES.md +%license LICENSE %files javadoc -f .mfiles-javadoc +%files assertj -f .mfiles-xmlunit-assertj +%files core -f .mfiles-xmlunit-core +%files legacy -f .mfiles-xmlunit-legacy +%files matchers -f .mfiles-xmlunit-matchers +%files placeholders -f .mfiles-xmlunit-placeholders %changelog +* Mon Mar 04 2019 Marian Koncek - 0:2.6.2-1 +- Update to upstream version 2.6.2 + * Fri Feb 09 2018 Fedora Release Engineering - 0:1.6-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 2cab78daff3a808f455b565d9b743f37c8357eb3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 09:24:52 +0000 Subject: [PATCH 04/19] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xmlunit.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xmlunit.spec b/xmlunit.spec index fd49cf2..f045aa4 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -121,6 +121,9 @@ This package provides %{summary}. * Mon Mar 04 2019 Marian Koncek - 0:2.6.2-1 - Update to upstream version 2.6.2 +* Sat Jul 14 2018 Fedora Release Engineering - 0:1.6-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Fri Feb 09 2018 Fedora Release Engineering - 0:1.6-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 454c51e168ca9261ecb8beab76bf6e2dd469cfa2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 12:35:09 +0000 Subject: [PATCH 05/19] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xmlunit.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xmlunit.spec b/xmlunit.spec index f045aa4..577e9a0 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -121,6 +121,9 @@ This package provides %{summary}. * Mon Mar 04 2019 Marian Koncek - 0:2.6.2-1 - Update to upstream version 2.6.2 +* Sun Feb 03 2019 Fedora Release Engineering - 0:1.6-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Sat Jul 14 2018 Fedora Release Engineering - 0:1.6-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 4b903176b553ec1957b371aa79a9a22b36def4fc Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Mon, 15 Apr 2019 14:37:10 +0200 Subject: [PATCH 06/19] Add patch file --- ...sable-tests-requiring-network-access.patch | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 0001-Disable-tests-requiring-network-access.patch diff --git a/0001-Disable-tests-requiring-network-access.patch b/0001-Disable-tests-requiring-network-access.patch new file mode 100644 index 0000000..62cb1b6 --- /dev/null +++ b/0001-Disable-tests-requiring-network-access.patch @@ -0,0 +1,146 @@ +From 72b14aa3c437984f15e026aeb3976de978e19436 Mon Sep 17 00:00:00 2001 +From: Marian Koncek +Date: Mon, 4 Mar 2019 14:52:59 +0100 +Subject: [PATCH] Disable tests requiring network access + +--- + .../assertj/XmlAssertNodesByXPathTest.java | 8 --- + .../assertj/XmlAssertValidationTest.java | 51 ------------------- + .../assertj/XmlAssertValueByXPathTest.java | 8 --- + .../matchers/ValidationMatcherTest.java | 13 ----- + 4 files changed, 80 deletions(-) + +diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java +index 6499f67..71267c3 100644 +--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java ++++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java +@@ -42,14 +42,6 @@ public class XmlAssertNodesByXPathTest { + assertThat(null).nodesByXPath("//foo"); + } + +- @Test +- public void testNodesByXPath_withNull_shouldFailed() { +- +- thrown.expectAssertionError(format("%nExpecting not blank but was:")); +- +- assertThat("").nodesByXPath(null); +- } +- + @Test + public void testNodesByXPath_withWhitespacesOnly_shouldFailed() { + +diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java +index cfa46ce..8031ede 100644 +--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java ++++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java +@@ -82,47 +82,6 @@ public class XmlAssertValidationTest { + assertThat(xml).isValidAgainst(xsd); + } + +- @Test +- public void testIsValidAgainst_withEmptySourcesArray_shouldPass() { +- +- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml")); +- +- assertThat(xml).isValidAgainst(); +- assertThat(xml).isValidAgainst(new Object[0]); +- } +- +- @Test +- public void testIsValidAgainst_withBrokenXmlAndEmptySourcesArray_shouldFailed() { +- +- thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" + +- " message=cvc-complex-type.2.4.b: The content of element 'Book' is not complete." + +- " One of '{\"https://www.xmlunit.org/publishing\":Publisher}' is expected."); +- +- StreamSource xml = new StreamSource(new File("../test-resources/invalidBook.xml")); +- +- assertThat(xml).isValidAgainst(); +- } +- +- @Test +- public void testIsValid_shouldPass() { +- +- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml")); +- +- assertThat(xml).isValid(); +- } +- +- @Test +- public void testIsValid_withBrokenXml_shouldPass() { +- +- thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" + +- " message=cvc-complex-type.2.4.b: The content of element 'Book' is not complete." + +- " One of '{\"https://www.xmlunit.org/publishing\":Publisher}' is expected."); +- +- StreamSource xml = new StreamSource(new File("../test-resources/invalidBook.xml")); +- +- assertThat(xml).isValid(); +- } +- + @Test + public void testIsInvalid_withBrokenXml_shouldPass() { + +@@ -131,16 +90,6 @@ public class XmlAssertValidationTest { + assertThat(xml).isInvalid(); + } + +- @Test +- public void testIsInvalid_shouldField() { +- +- thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*\\.\\.\\/test-resources\\/BookXsdGenerated.xml>\\nto be invalid"); +- +- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml")); +- +- assertThat(xml).isInvalid(); +- } +- + @Test + public void testIsValidAgainst_withNullSchemaSources_shouldFailed() { + +diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java +index 4aaf96b..d3a9cdd 100644 +--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java ++++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java +@@ -25,14 +25,6 @@ public class XmlAssertValueByXPathTest { + @Rule + public ExpectedException thrown = none(); + +- @Test +- public void testValueByXPath_withNull_shouldFailed() { +- +- thrown.expectAssertionError(format("%nExpecting not blank but was:")); +- +- assertThat("").valueByXPath(null); +- } +- + @Test + public void testValueByXPath_withWhitespacesOnly_shouldFailed() { + +diff --git a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java +index 793e26a..eb4e9fa 100644 +--- a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java ++++ b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java +@@ -76,19 +76,6 @@ public class ValidationMatcherTest { + is(valid(new StreamSource(new File("../test-resources/Book.xsd"))))); + } + +- @Test +- public void shouldSuccessfullyValidateInstanceWithoutExplicitSchemaSource() { +- try { +- Class.forName("java.nio.file.FileSystem"); +- } catch (Throwable t) { +- assumeTrue("Skipping on Java6 as it doesn't like xmlunit.org's certificate", +- false); +- } +- assertThat(new StreamSource(new File("../test-resources/BookXsdGenerated.xml")), +- is(new ValidationMatcher())); +- +- } +- + @Test(expected = AssertionError.class) + public void shouldThrowOnBrokenInstanceWithoutExplicitSchemaSource() { + assertThat(new StreamSource(new File("../test-resources/invalidBook.xml")), +-- +2.20.1 + From d46156552fc99a0ade644563d85297ba263c3f79 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 24 May 2019 17:01:49 +0200 Subject: [PATCH 07/19] Mass rebuild for javapackages-tools 201901 --- xmlunit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xmlunit.spec b/xmlunit.spec index 577e9a0..4dc2007 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -30,7 +30,7 @@ Name: xmlunit Version: 2.6.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Provides classes to do asserts on xml License: ASL 2.0 Source0: https://github.com/xmlunit/xmlunit/releases/download/v%{version}/%{name}-%{version}-src.tar.gz @@ -118,6 +118,9 @@ This package provides %{summary}. %files placeholders -f .mfiles-xmlunit-placeholders %changelog +* Fri May 24 2019 Mikolaj Izdebski - 2.6.2-2 +- Mass rebuild for javapackages-tools 201901 + * Mon Mar 04 2019 Marian Koncek - 0:2.6.2-1 - Update to upstream version 2.6.2 From 0069db79ff38591f024be7607aa92fcec947e532 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 27 Jun 2019 10:04:24 +0200 Subject: [PATCH 08/19] Update to upstream version 2.6.3 --- .gitignore | 1 + sources | 2 +- xmlunit.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 937380e..7e85c99 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ xmlunit-1.3-src.zip /xmlunit-1.5-src.zip /xmlunit-1.6-src.zip /xmlunit-2.6.2-src.tar.gz +/xmlunit-2.6.3-src.tar.gz diff --git a/sources b/sources index 98f45df..afb883f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xmlunit-2.6.2-src.tar.gz) = 7e71626e604f475e0dffaabf814a81e0d2a6fd43790e2371858c815c676d5b3d6e9f285f98d817ff1b41a81323441bdadb56b8d172419f5546ff6ffc1f7ace7c +SHA512 (xmlunit-2.6.3-src.tar.gz) = c52e9dc1d67ee61d266d35e59e7c54ca554fcc8fd7036ed1c6dacb85ebf8cc545da0cae9863b1c228b59abfd1ae659b080f691c02257b96f3882a9d9ecb8dbf9 diff --git a/xmlunit.spec b/xmlunit.spec index 4dc2007..27a5adc 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -29,8 +29,8 @@ # Name: xmlunit -Version: 2.6.2 -Release: 2%{?dist} +Version: 2.6.3 +Release: 1%{?dist} Summary: Provides classes to do asserts on xml License: ASL 2.0 Source0: https://github.com/xmlunit/xmlunit/releases/download/v%{version}/%{name}-%{version}-src.tar.gz @@ -118,6 +118,9 @@ This package provides %{summary}. %files placeholders -f .mfiles-xmlunit-placeholders %changelog +* Wed Jun 26 2019 Marian Koncek - 2.6.3-1 +- Update to upstream version 2.6.3 + * Fri May 24 2019 Mikolaj Izdebski - 2.6.2-2 - Mass rebuild for javapackages-tools 201901 From cdf8080bd32bde75520fff74828ddbae14a0213b Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 31 Jul 2019 10:20:29 +0200 Subject: [PATCH 09/19] Add license breakdown --- xmlunit.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xmlunit.spec b/xmlunit.spec index 27a5adc..9ca54ba 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -32,7 +32,8 @@ Name: xmlunit Version: 2.6.3 Release: 1%{?dist} Summary: Provides classes to do asserts on xml -License: ASL 2.0 +# The whole package is ASL 2.0 except for xmlunit-legacy which is BSD +License: ASL 2.0 and BSD Source0: https://github.com/xmlunit/xmlunit/releases/download/v%{version}/%{name}-%{version}-src.tar.gz URL: https://www.xmlunit.org/ From 47ff2538c659f14d4dc467641206f87652abcf1a Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 29 Aug 2019 14:02:27 +0200 Subject: [PATCH 10/19] Port to hamcrest 2.1 --- 0002-Port-to-hamcrest-2.1.patch | 156 ++++++++++++++++++++++++++++++++ xmlunit.spec | 6 +- 2 files changed, 160 insertions(+), 2 deletions(-) create mode 100644 0002-Port-to-hamcrest-2.1.patch diff --git a/0002-Port-to-hamcrest-2.1.patch b/0002-Port-to-hamcrest-2.1.patch new file mode 100644 index 0000000..598756d --- /dev/null +++ b/0002-Port-to-hamcrest-2.1.patch @@ -0,0 +1,156 @@ +From 34381040944bd88047f6fc230cf8b72b23304692 Mon Sep 17 00:00:00 2001 +From: Marian Koncek +Date: Thu, 29 Aug 2019 13:58:24 +0200 +Subject: [PATCH] Port to hamcrest 2.1 + +--- + .../src/main/java/org/xmlunit/matchers/CompareMatcher.java | 3 --- + .../main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java | 2 -- + .../src/main/java/org/xmlunit/matchers/HasXPathMatcher.java | 2 -- + .../src/main/java/org/xmlunit/matchers/TypeMatcher.java | 5 ----- + .../main/java/org/xmlunit/matchers/ValidationMatcher.java | 3 --- + 5 files changed, 15 deletions(-) + +diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java +index 6452081..226399c 100644 +--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java ++++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java +@@ -33,7 +33,6 @@ import org.xmlunit.util.Predicate; + + import org.hamcrest.BaseMatcher; + import org.hamcrest.Description; +-import org.hamcrest.Factory; + import org.hamcrest.Matcher; + + import java.lang.reflect.Constructor; +@@ -112,7 +111,6 @@ public final class CompareMatcher extends BaseMatcher + *

+ * As input all types are supported which are supported by {@link Input#from(Object)}. + */ +- @Factory + public static CompareMatcher isIdenticalTo(final Object control) { + return new CompareMatcher(control).checkForIdentical(); + } +@@ -128,7 +126,6 @@ public final class CompareMatcher extends BaseMatcher + *

+ * As input all types are supported which are supported by {@link Input#from(Object)}. + */ +- @Factory + public static CompareMatcher isSimilarTo(final Object control) { + return new CompareMatcher(control).checkForSimilar(); + } +diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java +index 6eb23e5..1e9b8b5 100644 +--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java ++++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java +@@ -16,7 +16,6 @@ package org.xmlunit.matchers; + + import org.hamcrest.BaseMatcher; + import org.hamcrest.Description; +-import org.hamcrest.Factory; + import org.hamcrest.Matcher; + import org.w3c.dom.Node; + import org.xmlunit.builder.Input; +@@ -93,7 +92,6 @@ public class EvaluateXPathMatcher extends BaseMatcher { + * @param valueMatcher matcher for the value at the specified xpath + * @return the xpath matcher + */ +- @Factory + public static EvaluateXPathMatcher hasXPath(String xPath, Matcher valueMatcher) { + return new EvaluateXPathMatcher(xPath, valueMatcher); + } +diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java +index 08325cd..6fbf0ac 100644 +--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java ++++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java +@@ -16,7 +16,6 @@ package org.xmlunit.matchers; + + import org.hamcrest.BaseMatcher; + import org.hamcrest.Description; +-import org.hamcrest.Factory; + import org.hamcrest.Matcher; + import org.w3c.dom.Node; + import org.xmlunit.builder.Input; +@@ -135,7 +134,6 @@ public class HasXPathMatcher extends BaseMatcher { + * @param xPath the target xpath + * @return the xpath matcher + */ +- @Factory + public static HasXPathMatcher hasXPath(String xPath) { + return new HasXPathMatcher(xPath); + } +diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/TypeMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/TypeMatcher.java +index b9002a1..7cd6843 100644 +--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/TypeMatcher.java ++++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/TypeMatcher.java +@@ -15,7 +15,6 @@ + package org.xmlunit.matchers; + + import org.hamcrest.Description; +-import org.hamcrest.Factory; + import org.hamcrest.Matcher; + import org.hamcrest.TypeSafeMatcher; + +@@ -128,7 +127,6 @@ public abstract class TypeMatcher extends TypeSafeMatcher { + * @param valueMatcher valueMatcher for the converted value + * @return the BigDecimal matcher + */ +- @Factory + public static TypeMatcher asBigDecimal(Matcher valueMatcher) { + return new BigDecimalTypeMatcher(valueMatcher); + } +@@ -146,7 +144,6 @@ public abstract class TypeMatcher extends TypeSafeMatcher { + * @param valueMatcher valueMatcher for the converted value + * @return the Double matcher + */ +- @Factory + public static TypeMatcher asDouble(Matcher valueMatcher) { + return new DoubleTypeMatcher(valueMatcher); + } +@@ -164,7 +161,6 @@ public abstract class TypeMatcher extends TypeSafeMatcher { + * @param valueMatcher valueMatcher for the converted value + * @return the Integer matcher + */ +- @Factory + public static TypeMatcher asInt(Matcher valueMatcher) { + return new IntegerTypeMatcher(valueMatcher); + } +@@ -182,7 +178,6 @@ public abstract class TypeMatcher extends TypeSafeMatcher { + * @param valueMatcher valueMatcher for the converted value + * @return the Boolean matcher + */ +- @Factory + public static TypeMatcher asBoolean(Matcher valueMatcher) { + return new BooleanTypeMatcher(valueMatcher); + } +diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java +index 3126349..51f58ec 100644 +--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java ++++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java +@@ -27,7 +27,6 @@ import org.xmlunit.validation.ValidationProblem; + import org.xmlunit.validation.ValidationResult; + import org.hamcrest.BaseMatcher; + import org.hamcrest.Description; +-import org.hamcrest.Factory; + + import javax.xml.transform.Source; + import javax.xml.validation.Schema; +@@ -121,7 +120,6 @@ public class ValidationMatcher extends BaseMatcher { + } + } + +- @Factory + public static ValidationMatcher valid(final Object schemaSource) { + return new ValidationMatcher(schemaSource); + } +@@ -129,7 +127,6 @@ public class ValidationMatcher extends BaseMatcher { + /** + * @since XMLUnit 2.3.0 + */ +- @Factory + public static ValidationMatcher valid(final Schema schema) { + return new ValidationMatcher(schema); + } +-- +2.21.0 + diff --git a/xmlunit.spec b/xmlunit.spec index 9ca54ba..d38d79b 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -37,7 +37,8 @@ License: ASL 2.0 and BSD Source0: https://github.com/xmlunit/xmlunit/releases/download/v%{version}/%{name}-%{version}-src.tar.gz URL: https://www.xmlunit.org/ -Patch0: 0001-Disable-tests-requiring-network-access.patch +Patch1: 0001-Disable-tests-requiring-network-access.patch +Patch2: 0002-Port-to-hamcrest-2.1.patch BuildRequires: maven-local BuildRequires: mvn(junit:junit) @@ -94,7 +95,8 @@ This package provides %{summary}. %prep %setup -q -n %{name}-%{version}-src -%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %pom_remove_plugin org.codehaus.mojo:buildnumber-maven-plugin %pom_remove_plugin :maven-assembly-plugin From 9d1266911e5396331f3dcf4c30f38d2f08e1c818 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 16 Oct 2019 16:24:06 +0200 Subject: [PATCH 11/19] Fix test failure --- 0003-Fix-test-failure.patch | 25 +++++++++++++++++++++++++ xmlunit.spec | 4 ++++ 2 files changed, 29 insertions(+) create mode 100644 0003-Fix-test-failure.patch diff --git a/0003-Fix-test-failure.patch b/0003-Fix-test-failure.patch new file mode 100644 index 0000000..cad643e --- /dev/null +++ b/0003-Fix-test-failure.patch @@ -0,0 +1,25 @@ +From e03f1786054c239e8562e0af4d1239970862e581 Mon Sep 17 00:00:00 2001 +From: Marian Koncek +Date: Wed, 16 Oct 2019 09:32:19 +0200 +Subject: [PATCH] Fix test failure + +--- + .../src/test/java/org/xmlunit/assertj/ValueAssertTest.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java +index d1e3545..87f77ee 100644 +--- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java ++++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java +@@ -224,7 +224,7 @@ public class ValueAssertTest { + @Test + public void testIsEqualTo_withAttributeValueExpression_shouldFailed() { + +- thrown.expectAssertionError("expected:<\"[something]\"> but was:<\"[abc]\">"); ++ thrown.expectAssertionError("Expecting:\n <\"abc\">\nto be equal to:\n <\"something\">\nbut was not."); + + String xml = ""; + +-- +2.21.0 + diff --git a/xmlunit.spec b/xmlunit.spec index d38d79b..4a94ffe 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -39,6 +39,7 @@ URL: https://www.xmlunit.org/ Patch1: 0001-Disable-tests-requiring-network-access.patch Patch2: 0002-Port-to-hamcrest-2.1.patch +Patch3: 0003-Fix-test-failure.patch BuildRequires: maven-local BuildRequires: mvn(junit:junit) @@ -97,6 +98,9 @@ This package provides %{summary}. %patch1 -p1 %patch2 -p1 +# This test failure showed up after updating mockito to 3.X, but the error +# message clearly points to assertj-core +%patch3 -p1 %pom_remove_plugin org.codehaus.mojo:buildnumber-maven-plugin %pom_remove_plugin :maven-assembly-plugin From c66208b50d89e27a4309affeefd03b2b309c7797 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 5 Nov 2019 12:15:57 +0100 Subject: [PATCH 12/19] Remove support for JAXB --- ...sable-tests-requiring-network-access.patch | 6 +- 0002-Port-to-hamcrest-2.1.patch | 4 +- 0003-Fix-test-failure.patch | 6 +- 0004-Drop-support-for-JAXB.patch | 60 +++++++++++++++++++ xmlunit.spec | 38 +++--------- 5 files changed, 76 insertions(+), 38 deletions(-) create mode 100644 0004-Drop-support-for-JAXB.patch diff --git a/0001-Disable-tests-requiring-network-access.patch b/0001-Disable-tests-requiring-network-access.patch index 62cb1b6..e3abb0f 100644 --- a/0001-Disable-tests-requiring-network-access.patch +++ b/0001-Disable-tests-requiring-network-access.patch @@ -1,7 +1,7 @@ -From 72b14aa3c437984f15e026aeb3976de978e19436 Mon Sep 17 00:00:00 2001 +From 73abcb06636217e52a9d56b4dc3c69bd37141d44 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Mon, 4 Mar 2019 14:52:59 +0100 -Subject: [PATCH] Disable tests requiring network access +Subject: [PATCH 1/4] Disable tests requiring network access --- .../assertj/XmlAssertNodesByXPathTest.java | 8 --- @@ -142,5 +142,5 @@ index 793e26a..eb4e9fa 100644 public void shouldThrowOnBrokenInstanceWithoutExplicitSchemaSource() { assertThat(new StreamSource(new File("../test-resources/invalidBook.xml")), -- -2.20.1 +2.21.0 diff --git a/0002-Port-to-hamcrest-2.1.patch b/0002-Port-to-hamcrest-2.1.patch index 598756d..70336f6 100644 --- a/0002-Port-to-hamcrest-2.1.patch +++ b/0002-Port-to-hamcrest-2.1.patch @@ -1,7 +1,7 @@ -From 34381040944bd88047f6fc230cf8b72b23304692 Mon Sep 17 00:00:00 2001 +From c81eb91d7b9aa9728dfc83d68a881b4e2a0fa8d2 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 29 Aug 2019 13:58:24 +0200 -Subject: [PATCH] Port to hamcrest 2.1 +Subject: [PATCH 2/4] Port to hamcrest 2.1 --- .../src/main/java/org/xmlunit/matchers/CompareMatcher.java | 3 --- diff --git a/0003-Fix-test-failure.patch b/0003-Fix-test-failure.patch index cad643e..afa0caa 100644 --- a/0003-Fix-test-failure.patch +++ b/0003-Fix-test-failure.patch @@ -1,14 +1,14 @@ -From e03f1786054c239e8562e0af4d1239970862e581 Mon Sep 17 00:00:00 2001 +From 2aa7002c9ff0d6226ff75048dd3cee15a180dd99 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 16 Oct 2019 09:32:19 +0200 -Subject: [PATCH] Fix test failure +Subject: [PATCH 3/4] Fix test failure --- .../src/test/java/org/xmlunit/assertj/ValueAssertTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java -index d1e3545..87f77ee 100644 +index d1e3545..5078360 100644 --- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java +++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java @@ -224,7 +224,7 @@ public class ValueAssertTest { diff --git a/0004-Drop-support-for-JAXB.patch b/0004-Drop-support-for-JAXB.patch new file mode 100644 index 0000000..0f90202 --- /dev/null +++ b/0004-Drop-support-for-JAXB.patch @@ -0,0 +1,60 @@ +From 9866f331db726db0ac6af64649c308b01b34ea56 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Tue, 5 Nov 2019 12:14:08 +0100 +Subject: [PATCH 4/4] Drop support for JAXB + +--- + xmlunit-core/src/main/java/org/xmlunit/builder/Input.java | 4 ++-- + .../src/test/java/org/xmlunit/builder/InputTest.java | 7 ------- + 2 files changed, 2 insertions(+), 9 deletions(-) + +diff --git a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java +index 5321ff7..2b13cac 100644 +--- a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java ++++ b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java +@@ -150,8 +150,8 @@ public class Input { + /** + * Build a Source from a Jaxb-Object. + */ +- public static JaxbBuilder fromJaxb(Object jaxbObject) { +- return new JaxbBuilder(jaxbObject); ++ public static Builder fromJaxb(Object jaxbObject) { ++ throw new RuntimeException("This implementation has JAXB support removed"); + } + + /** +diff --git a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java +index 83ff38a..fac270d 100644 +--- a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java ++++ b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java +@@ -31,7 +31,6 @@ import org.w3c.dom.Document; + import org.xmlunit.NullNode; + import org.xmlunit.TestResources; + import org.xmlunit.XMLUnitException; +-import org.xmlunit.builder.jaxb.ComplexNode; + import org.xmlunit.util.Convert; + import org.xmlunit.xpath.JAXPXPathEngine; + +@@ -148,10 +147,6 @@ public class InputTest { + allIsWellFor(s, "furry"); + } + +- @Test public void shouldParseJaxbObject() throws Exception { +- allIsWellFor(Input.fromJaxb(new ComplexNode()).build(), "complexNode"); +- } +- + @Test public void shouldParseUnknownToSource() throws Exception { + // from Source + allIsWellFor(Input.from(Input.fromByteArray(readTestFile()).build()).build()); +@@ -169,8 +164,6 @@ public class InputTest { + allIsWellFor(Input.from(new URI("file:" + TestResources.ANIMAL_FILE)).build()); + // from URL + allIsWellFor(Input.from(new URL("file:" + TestResources.ANIMAL_FILE)).build()); +- // from Jaxb-Object +- allIsWellFor(Input.from(new ComplexNode()).build(), "complexNode"); + // from InputStream + FileInputStream is = null; + try { +-- +2.21.0 + diff --git a/xmlunit.spec b/xmlunit.spec index 4a94ffe..2b05925 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -1,33 +1,3 @@ -# Copyright (c) 2000-2007, JPackage Project -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the -# distribution. -# 3. Neither the name of the JPackage Project nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - Name: xmlunit Version: 2.6.3 Release: 1%{?dist} @@ -40,6 +10,7 @@ URL: https://www.xmlunit.org/ Patch1: 0001-Disable-tests-requiring-network-access.patch Patch2: 0002-Port-to-hamcrest-2.1.patch Patch3: 0003-Fix-test-failure.patch +Patch4: 0004-Drop-support-for-JAXB.patch BuildRequires: maven-local BuildRequires: mvn(junit:junit) @@ -101,12 +72,19 @@ This package provides %{summary}. # This test failure showed up after updating mockito to 3.X, but the error # message clearly points to assertj-core %patch3 -p1 +%patch4 -p1 %pom_remove_plugin org.codehaus.mojo:buildnumber-maven-plugin %pom_remove_plugin :maven-assembly-plugin %mvn_alias "org.xmlunit:xmlunit-legacy" "xmlunit:xmlunit" +# JAXB and JAF are not available in JDK11 +%pom_remove_dep javax.activation:* xmlunit-core +%pom_remove_dep javax.xml.bind:* xmlunit-core +%pom_remove_dep com.sun.xml.bind:* xmlunit-core +rm -rf xmlunit-core/src/{main,test}/java/org/xmlunit/builder/{jaxb/,JaxbBuilder.java,JaxbBuilderTest.java} + %build %mvn_build -s From 52471fceafa15b0e6fc2262e459ce2652392d232 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 5 Nov 2019 17:29:28 +0100 Subject: [PATCH 13/19] Mass rebuild for javapackages-tools 201902 --- xmlunit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xmlunit.spec b/xmlunit.spec index 2b05925..c96425a 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -1,6 +1,6 @@ Name: xmlunit Version: 2.6.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Provides classes to do asserts on xml # The whole package is ASL 2.0 except for xmlunit-legacy which is BSD License: ASL 2.0 and BSD @@ -103,6 +103,9 @@ rm -rf xmlunit-core/src/{main,test}/java/org/xmlunit/builder/{jaxb/,JaxbBuilder. %files placeholders -f .mfiles-xmlunit-placeholders %changelog +* Tue Nov 05 2019 Mikolaj Izdebski - 2.6.3-2 +- Mass rebuild for javapackages-tools 201902 + * Wed Jun 26 2019 Marian Koncek - 2.6.3-1 - Update to upstream version 2.6.3 From 87b1cbe13555336f0bcb987b0e3cd3217b8627b8 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sun, 17 May 2020 09:52:44 +0200 Subject: [PATCH 14/19] Remove dependency on maven-shade-plugin --- xmlunit.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmlunit.spec b/xmlunit.spec index c96425a..9b52196 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -15,7 +15,6 @@ Patch4: 0004-Drop-support-for-JAXB.patch BuildRequires: maven-local BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) -BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin) BuildRequires: mvn(org.assertj:assertj-core) BuildRequires: mvn(org.hamcrest:hamcrest-core) BuildRequires: mvn(org.hamcrest:hamcrest-library) @@ -76,6 +75,7 @@ This package provides %{summary}. %pom_remove_plugin org.codehaus.mojo:buildnumber-maven-plugin %pom_remove_plugin :maven-assembly-plugin +%pom_remove_plugin -r :maven-shade-plugin %mvn_alias "org.xmlunit:xmlunit-legacy" "xmlunit:xmlunit" From ac68d202597f41909222a03002e1ebb095d3932d Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 29 Jul 2020 09:54:23 +0200 Subject: [PATCH 15/19] Update to upstream version 2.7.0 --- .gitignore | 1 + ...sable-tests-requiring-network-access.patch | 197 ++++++++---------- sources | 2 +- xmlunit.spec | 8 +- 4 files changed, 97 insertions(+), 111 deletions(-) diff --git a/.gitignore b/.gitignore index 7e85c99..3ce3159 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ xmlunit-1.3-src.zip /xmlunit-1.6-src.zip /xmlunit-2.6.2-src.tar.gz /xmlunit-2.6.3-src.tar.gz +/xmlunit-2.7.0-src.tar.gz diff --git a/0001-Disable-tests-requiring-network-access.patch b/0001-Disable-tests-requiring-network-access.patch index e3abb0f..a6c2a0b 100644 --- a/0001-Disable-tests-requiring-network-access.patch +++ b/0001-Disable-tests-requiring-network-access.patch @@ -4,143 +4,124 @@ Date: Mon, 4 Mar 2019 14:52:59 +0100 Subject: [PATCH 1/4] Disable tests requiring network access --- - .../assertj/XmlAssertNodesByXPathTest.java | 8 --- - .../assertj/XmlAssertValidationTest.java | 51 ------------------- - .../assertj/XmlAssertValueByXPathTest.java | 8 --- - .../matchers/ValidationMatcherTest.java | 13 ----- - 4 files changed, 80 deletions(-) + .../java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java | 2 ++ + .../java/org/xmlunit/assertj/XmlAssertValidationTest.java | 6 ++++++ + .../java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java | 2 ++ + .../java/org/xmlunit/matchers/ValidationMatcherTest.java | 2 ++ + 4 files changed, 12 insertions(+) diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java -index 6499f67..71267c3 100644 +index 6499f67..c465a51 100644 --- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java +++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java -@@ -42,14 +42,6 @@ public class XmlAssertNodesByXPathTest { - assertThat(null).nodesByXPath("//foo"); +@@ -13,6 +13,7 @@ + */ + package org.xmlunit.assertj; + ++import org.junit.Ignore; + import org.junit.Rule; + import org.junit.Test; + +@@ -43,6 +44,7 @@ public class XmlAssertNodesByXPathTest { } -- @Test -- public void testNodesByXPath_withNull_shouldFailed() { -- -- thrown.expectAssertionError(format("%nExpecting not blank but was:")); -- -- assertThat("").nodesByXPath(null); -- } -- @Test - public void testNodesByXPath_withWhitespacesOnly_shouldFailed() { ++ @Ignore + public void testNodesByXPath_withNull_shouldFailed() { + thrown.expectAssertionError(format("%nExpecting not blank but was:")); diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java -index cfa46ce..8031ede 100644 +index 7e2dc0e..f743cc4 100644 --- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java +++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java -@@ -82,47 +82,6 @@ public class XmlAssertValidationTest { - assertThat(xml).isValidAgainst(xsd); +@@ -14,6 +14,7 @@ + package org.xmlunit.assertj; + + import org.junit.ClassRule; ++import org.junit.Ignore; + import org.junit.Rule; + import org.junit.Test; + import org.xmlunit.TestResources; +@@ -91,6 +92,7 @@ public class XmlAssertValidationTest { } -- @Test -- public void testIsValidAgainst_withEmptySourcesArray_shouldPass() { -- -- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml")); -- -- assertThat(xml).isValidAgainst(); -- assertThat(xml).isValidAgainst(new Object[0]); -- } -- -- @Test -- public void testIsValidAgainst_withBrokenXmlAndEmptySourcesArray_shouldFailed() { -- -- thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" + -- " message=cvc-complex-type.2.4.b: The content of element 'Book' is not complete." + -- " One of '{\"https://www.xmlunit.org/publishing\":Publisher}' is expected."); -- -- StreamSource xml = new StreamSource(new File("../test-resources/invalidBook.xml")); -- -- assertThat(xml).isValidAgainst(); -- } -- -- @Test -- public void testIsValid_shouldPass() { -- -- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml")); -- -- assertThat(xml).isValid(); -- } -- -- @Test -- public void testIsValid_withBrokenXml_shouldPass() { -- -- thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" + -- " message=cvc-complex-type.2.4.b: The content of element 'Book' is not complete." + -- " One of '{\"https://www.xmlunit.org/publishing\":Publisher}' is expected."); -- -- StreamSource xml = new StreamSource(new File("../test-resources/invalidBook.xml")); -- -- assertThat(xml).isValid(); -- } -- @Test - public void testIsInvalid_withBrokenXml_shouldPass() { ++ @Ignore + public void testIsValidAgainst_withEmptySourcesArray_shouldPass() { -@@ -131,16 +90,6 @@ public class XmlAssertValidationTest { - assertThat(xml).isInvalid(); + StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml")); +@@ -100,6 +102,7 @@ public class XmlAssertValidationTest { } -- @Test -- public void testIsInvalid_shouldField() { -- -- thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*\\.\\.\\/test-resources\\/BookXsdGenerated.xml>\\nto be invalid"); -- -- StreamSource xml = new StreamSource(new File("../test-resources/BookXsdGenerated.xml")); -- -- assertThat(xml).isInvalid(); -- } -- @Test - public void testIsValidAgainst_withNullSchemaSources_shouldFailed() { ++ @Ignore + public void testIsValidAgainst_withBrokenXmlAndEmptySourcesArray_shouldFailed() { + thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" + +@@ -112,6 +115,7 @@ public class XmlAssertValidationTest { + } + + @Test ++ @Ignore + public void testIsValid_shouldPass() { + + StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml")); +@@ -120,6 +124,7 @@ public class XmlAssertValidationTest { + } + + @Test ++ @Ignore + public void testIsValid_withBrokenXml_shouldPass() { + + thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" + +@@ -140,6 +145,7 @@ public class XmlAssertValidationTest { + } + + @Test ++ @Ignore + public void testIsInvalid_shouldField() { + + thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*" diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java -index 4aaf96b..d3a9cdd 100644 +index 3ce5284..63c3db0 100644 --- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java +++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java -@@ -25,14 +25,6 @@ public class XmlAssertValueByXPathTest { - @Rule - public ExpectedException thrown = none(); +@@ -14,6 +14,7 @@ + package org.xmlunit.assertj; + + import org.junit.ClassRule; ++import org.junit.Ignore; + import org.junit.Rule; + import org.junit.Test; + import org.xmlunit.assertj.util.SetEnglishLocaleRule; +@@ -31,6 +32,7 @@ public class XmlAssertValueByXPathTest { + public static SetEnglishLocaleRule locale = new SetEnglishLocaleRule(); -- @Test -- public void testValueByXPath_withNull_shouldFailed() { -- -- thrown.expectAssertionError(format("%nExpecting not blank but was:")); -- -- assertThat("").valueByXPath(null); -- } -- @Test - public void testValueByXPath_withWhitespacesOnly_shouldFailed() { ++ @Ignore + public void testValueByXPath_withNull_shouldFailed() { + thrown.expectAssertionError(format("%nExpecting not blank but was:")); diff --git a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java -index 793e26a..eb4e9fa 100644 +index 6f26927..bf9a153 100644 --- a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java +++ b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java -@@ -76,19 +76,6 @@ public class ValidationMatcherTest { - is(valid(new StreamSource(new File("../test-resources/Book.xsd"))))); +@@ -13,6 +13,7 @@ + */ + package org.xmlunit.matchers; + ++import org.junit.Ignore; + import org.junit.Rule; + import org.junit.Test; + import org.junit.rules.ExpectedException; +@@ -79,6 +80,7 @@ public class ValidationMatcherTest { } -- @Test -- public void shouldSuccessfullyValidateInstanceWithoutExplicitSchemaSource() { -- try { -- Class.forName("java.nio.file.FileSystem"); -- } catch (Throwable t) { -- assumeTrue("Skipping on Java6 as it doesn't like xmlunit.org's certificate", -- false); -- } -- assertThat(new StreamSource(new File("../test-resources/BookXsdGenerated.xml")), -- is(new ValidationMatcher())); -- -- } -- - @Test(expected = AssertionError.class) - public void shouldThrowOnBrokenInstanceWithoutExplicitSchemaSource() { - assertThat(new StreamSource(new File("../test-resources/invalidBook.xml")), + @Test ++ @Ignore + public void shouldSuccessfullyValidateInstanceWithoutExplicitSchemaSource() { + try { + Class.forName("java.nio.file.FileSystem"); -- -2.21.0 +2.25.4 diff --git a/sources b/sources index afb883f..4d4b1d2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xmlunit-2.6.3-src.tar.gz) = c52e9dc1d67ee61d266d35e59e7c54ca554fcc8fd7036ed1c6dacb85ebf8cc545da0cae9863b1c228b59abfd1ae659b080f691c02257b96f3882a9d9ecb8dbf9 +SHA512 (xmlunit-2.7.0-src.tar.gz) = 888e13165962d1a3906236e760fccd28cb7053f962a34da58d8c3b9305cd1a610aca7be19f7fca9fec69ef4be4cb5e2a8355a0c43f27c14d6d3b693e1a0f8d6e diff --git a/xmlunit.spec b/xmlunit.spec index 9b52196..7ebf0dc 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -1,6 +1,6 @@ Name: xmlunit -Version: 2.6.3 -Release: 2%{?dist} +Version: 2.7.0 +Release: 1%{?dist} Summary: Provides classes to do asserts on xml # The whole package is ASL 2.0 except for xmlunit-legacy which is BSD License: ASL 2.0 and BSD @@ -14,6 +14,7 @@ Patch4: 0004-Drop-support-for-JAXB.patch BuildRequires: maven-local BuildRequires: mvn(junit:junit) +BuildRequires: mvn(net.bytebuddy:byte-buddy) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.assertj:assertj-core) BuildRequires: mvn(org.hamcrest:hamcrest-core) @@ -103,6 +104,9 @@ rm -rf xmlunit-core/src/{main,test}/java/org/xmlunit/builder/{jaxb/,JaxbBuilder. %files placeholders -f .mfiles-xmlunit-placeholders %changelog +* Wed Jul 29 2020 Marian Koncek - 2.7.0-1 +- Update to upstream version 2.7.0 + * Tue Nov 05 2019 Mikolaj Izdebski - 2.6.3-2 - Mass rebuild for javapackages-tools 201902 From 5376222dcfe73b9bc4a9a0223a7b33bde68246f9 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Fri, 22 Jan 2021 17:09:52 +0100 Subject: [PATCH 16/19] Port to assertj 3.18.1 --- 0005-Port-to-assertj-3.18.1.patch | 25 +++++++++++++++++++++++++ xmlunit.spec | 3 +++ 2 files changed, 28 insertions(+) create mode 100644 0005-Port-to-assertj-3.18.1.patch diff --git a/0005-Port-to-assertj-3.18.1.patch b/0005-Port-to-assertj-3.18.1.patch new file mode 100644 index 0000000..48f90a9 --- /dev/null +++ b/0005-Port-to-assertj-3.18.1.patch @@ -0,0 +1,25 @@ +From 756086b87081019f4ed1720bded0a92fc79a2794 Mon Sep 17 00:00:00 2001 +From: Marian Koncek +Date: Fri, 22 Jan 2021 16:51:55 +0100 +Subject: [PATCH] Port to assertj 3.18.1 + +--- + .../src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xmlunit-assertj/src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java b/xmlunit-assertj/src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java +index 4d56aa5..a6b27c4 100644 +--- a/xmlunit-assertj/src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java ++++ b/xmlunit-assertj/src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java +@@ -58,7 +58,7 @@ abstract class CustomAbstractAssert currentAssertClass = getClass(); + while (currentAssertClass != AbstractAssert.class) { +-- +2.29.2 + diff --git a/xmlunit.spec b/xmlunit.spec index 7ebf0dc..02152e6 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -11,6 +11,7 @@ Patch1: 0001-Disable-tests-requiring-network-access.patch Patch2: 0002-Port-to-hamcrest-2.1.patch Patch3: 0003-Fix-test-failure.patch Patch4: 0004-Drop-support-for-JAXB.patch +Patch5: 0005-Port-to-assertj-3.18.1.patch BuildRequires: maven-local BuildRequires: mvn(junit:junit) @@ -74,6 +75,8 @@ This package provides %{summary}. %patch3 -p1 %patch4 -p1 +%patch5 -p1 + %pom_remove_plugin org.codehaus.mojo:buildnumber-maven-plugin %pom_remove_plugin :maven-assembly-plugin %pom_remove_plugin -r :maven-shade-plugin From d6d2b054fc84a0e411870f0285c96fdc1d7d2704 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 28 Jan 2021 15:00:57 +0100 Subject: [PATCH 17/19] Update to upstream version 2.8.2 --- .gitignore | 1 + ...sable-tests-requiring-network-access.patch | 32 +++++++++---------- ....patch => 0003-Drop-support-for-JAXB.patch | 16 +++++----- 0003-Fix-test-failure.patch | 25 --------------- 0005-Port-to-assertj-3.18.1.patch | 25 --------------- sources | 2 +- xmlunit.spec | 29 +++++++++-------- 7 files changed, 42 insertions(+), 88 deletions(-) rename 0004-Drop-support-for-JAXB.patch => 0003-Drop-support-for-JAXB.patch (87%) delete mode 100644 0003-Fix-test-failure.patch delete mode 100644 0005-Port-to-assertj-3.18.1.patch diff --git a/.gitignore b/.gitignore index 3ce3159..4739bb3 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ xmlunit-1.3-src.zip /xmlunit-2.6.2-src.tar.gz /xmlunit-2.6.3-src.tar.gz /xmlunit-2.7.0-src.tar.gz +/xmlunit-2.8.2-src.tar.gz diff --git a/0001-Disable-tests-requiring-network-access.patch b/0001-Disable-tests-requiring-network-access.patch index a6c2a0b..83c06da 100644 --- a/0001-Disable-tests-requiring-network-access.patch +++ b/0001-Disable-tests-requiring-network-access.patch @@ -4,19 +4,19 @@ Date: Mon, 4 Mar 2019 14:52:59 +0100 Subject: [PATCH 1/4] Disable tests requiring network access --- - .../java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java | 2 ++ - .../java/org/xmlunit/assertj/XmlAssertValidationTest.java | 6 ++++++ - .../java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java | 2 ++ + .../java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java | 2 ++ + .../java/org/xmlunit/assertj3/XmlAssertValidationTest.java | 6 ++++++ + .../java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java | 2 ++ .../java/org/xmlunit/matchers/ValidationMatcherTest.java | 2 ++ 4 files changed, 12 insertions(+) -diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java +diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java index 6499f67..c465a51 100644 ---- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java -+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertNodesByXPathTest.java +--- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java ++++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java @@ -13,6 +13,7 @@ */ - package org.xmlunit.assertj; + package org.xmlunit.assertj3; +import org.junit.Ignore; import org.junit.Rule; @@ -30,12 +30,12 @@ index 6499f67..c465a51 100644 public void testNodesByXPath_withNull_shouldFailed() { thrown.expectAssertionError(format("%nExpecting not blank but was:")); -diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java +diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java index 7e2dc0e..f743cc4 100644 ---- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java -+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValidationTest.java +--- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java ++++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java @@ -14,6 +14,7 @@ - package org.xmlunit.assertj; + package org.xmlunit.assertj3; import org.junit.ClassRule; +import org.junit.Ignore; @@ -82,18 +82,18 @@ index 7e2dc0e..f743cc4 100644 public void testIsInvalid_shouldField() { thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*" -diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java +diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java index 3ce5284..63c3db0 100644 ---- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java -+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/XmlAssertValueByXPathTest.java +--- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java ++++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java @@ -14,6 +14,7 @@ - package org.xmlunit.assertj; + package org.xmlunit.assertj3; import org.junit.ClassRule; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; - import org.xmlunit.assertj.util.SetEnglishLocaleRule; + import org.xmlunit.assertj3.util.SetEnglishLocaleRule; @@ -31,6 +32,7 @@ public class XmlAssertValueByXPathTest { public static SetEnglishLocaleRule locale = new SetEnglishLocaleRule(); diff --git a/0004-Drop-support-for-JAXB.patch b/0003-Drop-support-for-JAXB.patch similarity index 87% rename from 0004-Drop-support-for-JAXB.patch rename to 0003-Drop-support-for-JAXB.patch index 0f90202..923eb35 100644 --- a/0004-Drop-support-for-JAXB.patch +++ b/0003-Drop-support-for-JAXB.patch @@ -9,10 +9,10 @@ Subject: [PATCH 4/4] Drop support for JAXB 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java -index 5321ff7..2b13cac 100644 +index 27d9c5a..81165cc 100644 --- a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java +++ b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java -@@ -150,8 +150,8 @@ public class Input { +@@ -153,8 +153,8 @@ public class Input { /** * Build a Source from a Jaxb-Object. */ @@ -24,7 +24,7 @@ index 5321ff7..2b13cac 100644 /** diff --git a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java -index 83ff38a..fac270d 100644 +index e767f38..98e3fe7 100644 --- a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java +++ b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java @@ -31,7 +31,6 @@ import org.w3c.dom.Document; @@ -35,7 +35,7 @@ index 83ff38a..fac270d 100644 import org.xmlunit.util.Convert; import org.xmlunit.xpath.JAXPXPathEngine; -@@ -148,10 +147,6 @@ public class InputTest { +@@ -132,10 +131,6 @@ public class InputTest { allIsWellFor(s, "furry"); } @@ -46,15 +46,15 @@ index 83ff38a..fac270d 100644 @Test public void shouldParseUnknownToSource() throws Exception { // from Source allIsWellFor(Input.from(Input.fromByteArray(readTestFile()).build()).build()); -@@ -169,8 +164,6 @@ public class InputTest { +@@ -153,8 +148,6 @@ public class InputTest { allIsWellFor(Input.from(new URI("file:" + TestResources.ANIMAL_FILE)).build()); // from URL allIsWellFor(Input.from(new URL("file:" + TestResources.ANIMAL_FILE)).build()); - // from Jaxb-Object - allIsWellFor(Input.from(new ComplexNode()).build(), "complexNode"); // from InputStream - FileInputStream is = null; - try { + try (FileInputStream is = new FileInputStream(TestResources.ANIMAL_FILE)) { + allIsWellFor(Input.from(is).build()); -- -2.21.0 +2.29.2 diff --git a/0003-Fix-test-failure.patch b/0003-Fix-test-failure.patch deleted file mode 100644 index afa0caa..0000000 --- a/0003-Fix-test-failure.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2aa7002c9ff0d6226ff75048dd3cee15a180dd99 Mon Sep 17 00:00:00 2001 -From: Marian Koncek -Date: Wed, 16 Oct 2019 09:32:19 +0200 -Subject: [PATCH 3/4] Fix test failure - ---- - .../src/test/java/org/xmlunit/assertj/ValueAssertTest.java | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java -index d1e3545..5078360 100644 ---- a/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java -+++ b/xmlunit-assertj/src/test/java/org/xmlunit/assertj/ValueAssertTest.java -@@ -224,7 +224,7 @@ public class ValueAssertTest { - @Test - public void testIsEqualTo_withAttributeValueExpression_shouldFailed() { - -- thrown.expectAssertionError("expected:<\"[something]\"> but was:<\"[abc]\">"); -+ thrown.expectAssertionError("Expecting:\n <\"abc\">\nto be equal to:\n <\"something\">\nbut was not."); - - String xml = ""; - --- -2.21.0 - diff --git a/0005-Port-to-assertj-3.18.1.patch b/0005-Port-to-assertj-3.18.1.patch deleted file mode 100644 index 48f90a9..0000000 --- a/0005-Port-to-assertj-3.18.1.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 756086b87081019f4ed1720bded0a92fc79a2794 Mon Sep 17 00:00:00 2001 -From: Marian Koncek -Date: Fri, 22 Jan 2021 16:51:55 +0100 -Subject: [PATCH] Port to assertj 3.18.1 - ---- - .../src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/xmlunit-assertj/src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java b/xmlunit-assertj/src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java -index 4d56aa5..a6b27c4 100644 ---- a/xmlunit-assertj/src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java -+++ b/xmlunit-assertj/src/main/java/org/xmlunit/assertj/CustomAbstractAssert.java -@@ -58,7 +58,7 @@ abstract class CustomAbstractAssert currentAssertClass = getClass(); - while (currentAssertClass != AbstractAssert.class) { --- -2.29.2 - diff --git a/sources b/sources index 4d4b1d2..8ac144c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xmlunit-2.7.0-src.tar.gz) = 888e13165962d1a3906236e760fccd28cb7053f962a34da58d8c3b9305cd1a610aca7be19f7fca9fec69ef4be4cb5e2a8355a0c43f27c14d6d3b693e1a0f8d6e +SHA512 (xmlunit-2.8.2-src.tar.gz) = 6d6caff75e21829c6e37777e7b37a6d9cdd6b03efb04866884b1b7630c0de584c78321b1f1145bdb47da7afeabb69ec81fa9ff980c41382c360572ef858df507 diff --git a/xmlunit.spec b/xmlunit.spec index 02152e6..6c2a244 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -1,5 +1,5 @@ Name: xmlunit -Version: 2.7.0 +Version: 2.8.2 Release: 1%{?dist} Summary: Provides classes to do asserts on xml # The whole package is ASL 2.0 except for xmlunit-legacy which is BSD @@ -9,9 +9,7 @@ URL: https://www.xmlunit.org/ Patch1: 0001-Disable-tests-requiring-network-access.patch Patch2: 0002-Port-to-hamcrest-2.1.patch -Patch3: 0003-Fix-test-failure.patch -Patch4: 0004-Drop-support-for-JAXB.patch -Patch5: 0005-Port-to-assertj-3.18.1.patch +Patch3: 0003-Drop-support-for-JAXB.patch BuildRequires: maven-local BuildRequires: mvn(junit:junit) @@ -70,23 +68,25 @@ This package provides %{summary}. %patch1 -p1 %patch2 -p1 -# This test failure showed up after updating mockito to 3.X, but the error -# message clearly points to assertj-core %patch3 -p1 -%patch4 -p1 -%patch5 -p1 +# Tests compare the string constent of thrown exceptions +# and we use a different version of assertj +find xmlunit-assertj3/src/test -name '*.java' -exec sed -i 's/\(Expecting not blank but was:\)<\(.*\)>/\1 \2/' {} + +sed -i 's/\(expected:\)<\\"\[\(something\)\]\\"> but was:<\\"\[\(abc\)\]\\">/\1 \\"\2\\"\\nbut was : \\"\3\\"/' xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/ValueAssertTest.java + +%pom_disable_module xmlunit-assertj %pom_remove_plugin org.codehaus.mojo:buildnumber-maven-plugin %pom_remove_plugin :maven-assembly-plugin %pom_remove_plugin -r :maven-shade-plugin -%mvn_alias "org.xmlunit:xmlunit-legacy" "xmlunit:xmlunit" +%mvn_alias org.xmlunit:xmlunit-legacy xmlunit:xmlunit +%mvn_alias org.xmlunit:xmlunit-assertj3 org.xmlunit:xmlunit-assertj # JAXB and JAF are not available in JDK11 -%pom_remove_dep javax.activation:* xmlunit-core -%pom_remove_dep javax.xml.bind:* xmlunit-core -%pom_remove_dep com.sun.xml.bind:* xmlunit-core +%pom_remove_dep org.glassfish.jaxb: xmlunit-core +%pom_remove_dep jakarta.xml.bind: xmlunit-core rm -rf xmlunit-core/src/{main,test}/java/org/xmlunit/builder/{jaxb/,JaxbBuilder.java,JaxbBuilderTest.java} %build @@ -100,13 +100,16 @@ rm -rf xmlunit-core/src/{main,test}/java/org/xmlunit/builder/{jaxb/,JaxbBuilder. %license LICENSE %files javadoc -f .mfiles-javadoc -%files assertj -f .mfiles-xmlunit-assertj +%files assertj -f .mfiles-xmlunit-assertj3 %files core -f .mfiles-xmlunit-core %files legacy -f .mfiles-xmlunit-legacy %files matchers -f .mfiles-xmlunit-matchers %files placeholders -f .mfiles-xmlunit-placeholders %changelog +* Tue Jan 26 2021 Marian Koncek - 2.8.2-1 +- Update to upstream version 2.8.2 + * Wed Jul 29 2020 Marian Koncek - 2.7.0-1 - Update to upstream version 2.7.0 From 4af2ad42c385a1ccd1d225cf0f502fbace8286fe Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 16 Apr 2021 15:33:13 +0200 Subject: [PATCH 18/19] Conditionalize buildrequires in bootstrap mode --- xmlunit.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xmlunit.spec b/xmlunit.spec index 6c2a244..62abe73 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -1,3 +1,5 @@ +%bcond_without bootstrap + Name: xmlunit Version: 2.8.2 Release: 1%{?dist} @@ -12,6 +14,9 @@ Patch2: 0002-Port-to-hamcrest-2.1.patch Patch3: 0003-Drop-support-for-JAXB.patch BuildRequires: maven-local +%if %{with bootstrap} +BuildRequires: javapackages-bootstrap +%else BuildRequires: mvn(junit:junit) BuildRequires: mvn(net.bytebuddy:byte-buddy) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) @@ -19,6 +24,7 @@ BuildRequires: mvn(org.assertj:assertj-core) BuildRequires: mvn(org.hamcrest:hamcrest-core) BuildRequires: mvn(org.hamcrest:hamcrest-library) BuildRequires: mvn(org.mockito:mockito-core) +%endif BuildArch: noarch From bbeb6a40d89ea1f18552ebee12a3c06f0f568474 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 13 May 2021 19:08:43 +0200 Subject: [PATCH 19/19] Turn off bootstrap mode by default --- xmlunit.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmlunit.spec b/xmlunit.spec index 62abe73..29dde8d 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -1,4 +1,4 @@ -%bcond_without bootstrap +%bcond_with bootstrap Name: xmlunit Version: 2.8.2