1 Commits

7 changed files with 137 additions and 148 deletions

View File

@@ -1,15 +0,0 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/xmlunit/xmlunit.git</param>
<param name="revision">v2.11.0</param>
<param name="match-tag">v*</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

BIN
xmlunit-1.6-src.zip LFS Normal file

Binary file not shown.

78
xmlunit-1.6.pom Normal file
View File

@@ -0,0 +1,78 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2007-2014, Jeff Martin, Tim Bacon
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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.
* Neither the name of the xmlunit.sourceforge.net 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.
-->
<!--
This POM is not usable as means to build XMLUnit with Maven2, it is
a minimal POM to allow XMLUnit's artifacts to be added to a Maven
repository.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<packaging>jar</packaging>
<name>XMLUnit for Java</name>
<version>1.6</version>
<url>http://www.xmlunit.org/</url>
<description>XMLUnit compares a control XML document to a test document or the result of a transformation, validates documents, and compares the results of XPath expressions.</description>
<licenses>
<license>
<name>BSD License</name>
<url>https://sourceforge.net/p/xmlunit/code/HEAD/tree/trunk/LICENSE.txt</url>
</license>
</licenses>
<scm>
<url>https://sourceforge.net/p/xmlunit/code/HEAD/tree/trunk/</url>
<connection>scm:svn:https://svn.code.sf.net/p/xmlunit/code/trunk</connection>
</scm>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<optional>true</optional>
</dependency>
</dependencies>
<!-- Personally I'm not fond of the developers section but Sonatype's OSSRH
requires it -->
<developers>
<developer>
<id>bodewig</id>
<name>Stefan Bodewig</name>
<email>stefan.bodewig@freenet dot de</email>
</developer>
</developers>
</project>

Binary file not shown.

Binary file not shown.

View File

@@ -1,25 +1,7 @@
-------------------------------------------------------------------
Wed Nov 5 16:56:35 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Upgrade to 2.11.0
* XMLUnit 2.x is a complete rewrite of XMLUnit and actually
doesn't share any code with XMLUnit for Java 1.x.
* Some goals for XMLUnit 2.x:
+ create .NET and Java versions that are compatible in design
while trying to be idiomatic for each platform
+ remove all static configuration (the old XMLUnit class
setter methods)
+ focus on the parts that are useful for testing
- XPath
- (Schema) validation
- comparisons
+ be independent of any test framework
* XMLUnit 1.x is no longer maintained
-------------------------------------------------------------------
Fri Sep 5 06:12:53 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Use directly the xalan-j2 jar instead of the jaxp_transform_impl
- Use diretly the xalan-j2 jar instead of the jaxp_transform_impl
alternative (bsc#1245931 and bsc#1245914)
-------------------------------------------------------------------

View File

@@ -1,7 +1,8 @@
#
# spec file for package xmlunit
#
# Copyright (c) 2025 SUSE LLC and contributors
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2000-2008, JPackage Project
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,142 +18,88 @@
Name: xmlunit
Version: 2.11.0
Version: 1.6
Release: 0
Summary: XMLUnit for Java
License: Apache-2.0 AND BSD-3-Clause
Summary: Provides classes to do asserts on XML
License: BSD-3-Clause
Group: Development/Libraries/Java
URL: https://www.xmlunit.org/
Source0: %{name}-%{version}.tar.xz
Source1: %{name}-build.tar.xz
URL: https://xmlunit.sourceforge.net/
Source0: https://download.sourceforge.net/%{name}/%{name}-%{version}-src.zip
Source1: https://repo1.maven.org/maven2/%{name}/%{name}/%{version}/%{name}-%{version}.pom
BuildRequires: ant
BuildRequires: assertj-core
BuildRequires: ant-junit
BuildRequires: fdupes
BuildRequires: glassfish-jaxb-api
BuildRequires: hamcrest
# Needed for maven conversions
BuildRequires: javapackages-local >= 6
BuildRequires: jaxb-api
BuildRequires: junit
BuildRequires: jurand
BuildRequires: unzip
BuildRequires: xalan-j2
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis >= 1.3
Requires: junit
Requires: xalan-j2
Requires: xerces-j2
Requires: xml-commons-apis >= 1.3
BuildArch: noarch
%description
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 assertj
Summary: XMLUnit with AssertJ fluent API
License: Apache-2.0
Group: Development/Libraries/Java
%description assertj
This package provides %{summary}.
%package core
Summary: XMLUnit for Java core package
License: Apache-2.0
Group: Development/Libraries/Java
%description core
This package provides %{summary}.
%package jakarta-jaxb-impl
Summary: XMLUnit for Java JAXB support using Jakarta EE packages
License: Apache-2.0
Group: Development/Libraries/Java
%description jakarta-jaxb-impl
This package provides %{summary}.
%package legacy
Summary: XMLUnit 1.x Compatibility Layer
License: BSD-3-Clause
Group: Development/Libraries/Java
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
%description legacy
This package provides %{summary}.
%package matchers
Summary: XMLUnit for Java Hamcrest Matchers
License: Apache-2.0
Group: Development/Libraries/Java
%description matchers
This package provides %{summary}.
%package placeholders
Summary: XMLUnit for Java Placeholder DSL for Comparisons
License: Apache-2.0
Group: Development/Libraries/Java
%description placeholders
This package provides %{summary}.
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.
%package javadoc
Summary: Javadoc for %{name}
License: Apache-2.0
Group: Documentation/HTML
%description javadoc
Javadoc for %{name}. Also contains userguide.
%prep
%autosetup -p1 -a1
%setup -q
# Port to hamcrest 2.1
%{java_remove_annotations} xmlunit-matchers -p org[.]hamcrest[.]Factory
perl -pi -e 's/\r$//g' README.txt LICENSE.txt
%pom_disable_module xmlunit-assertj
# remove all binary libs and javadocs
find . -name "*.jar" -delete
%build
mkdir -p lib
build-jar-repository -s lib \
assertj-core/assertj-core \
glassfish-jaxb-api \
hamcrest/hamcrest \
jaxb-api/jakarta.xml.bind-api \
junit
ant package javadoc
cat > build.properties << EOF
junit.lib=$(build-classpath junit)
xmlxsl.lib=$(build-classpath xalan-j2 xerces-j2 xml-commons-jaxp-1.3-apis)
test.report.dir=test
EOF
cat > docbook.properties <<EOF
db5.xsl=%{_datadir}/xml/docbook/stylesheet/nwalsh/current/
EOF
export CLASSPATH=
export OPT_JAR_LIST="junit ant/ant-junit xalan-j2 ant/ant-trax xalan-j2-serializer"
ant -Djavac.source=1.8 -Djavac.target=1.8 -Dbuild.compiler=modern -Dhaltonfailure=yes jar javadocs
%install
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
install -dm 0755 %{buildroot}%{_javadir}/%{name}
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
for i in assertj3 core jakarta-jaxb-impl legacy matchers placeholders; do
cp -r %{name}-${i}/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/${i}
install -pm 0644 %{name}-${i}/target/%{name}-${i}-%{version}.jar \
%{buildroot}%{_javadir}/%{name}/%{name}-${i}.jar
%{mvn_install_pom} %{name}-${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}-${i}.pom
if [ "${i}" = legacy ]; then
%add_maven_depmap %{name}/%{name}-${i}.pom %{name}/%{name}-${i}.jar -a xmlunit:xmlunit -f ${i}
elif [ "${i}" = assertj3 ]; then
%add_maven_depmap %{name}/%{name}-${i}.pom %{name}/%{name}-${i}.jar -a org.xmlunit:xmlunit-assertj -f ${i}
else
%add_maven_depmap %{name}/%{name}-${i}.pom %{name}/%{name}-${i}.jar -f ${i}
fi
done
ln -s -f %{name}/%{name}-legacy.jar %{buildroot}%{_javadir}/%{name}.jar
%fdupes -s %{buildroot}%{_javadocdir}
mkdir -p %{buildroot}%{_javadir}
install -m 0644 build/lib/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
%files assertj -f .mfiles-assertj3
# Javadoc
mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -pr build/doc/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
%files core -f .mfiles-core
%doc README.md CONTRIBUTING.md RELEASE_NOTES.md
%license LICENSE
# poms
install -d -m 755 %{buildroot}%{_mavenpomdir}
%{mvn_install_pom} %{SOURCE1} \
%{buildroot}%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}.pom %{name}.jar
%files jakarta-jaxb-impl -f .mfiles-jakarta-jaxb-impl
%files legacy -f .mfiles-legacy
%{_javadir}/%{name}.jar
%files matchers -f .mfiles-matchers
%files placeholders -f .mfiles-placeholders
%files -f .mfiles
%license LICENSE.txt
%doc README.txt
%files javadoc
%doc userguide
%{_javadocdir}/%{name}
%changelog