diff --git a/.gitignore b/.gitignore
index c9f55e9..eb74f1f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-xmlgraphics-commons-1.3-src.tar.gz
-xmlgraphics-commons-1.3.1-src.tar.gz
+/xmlgraphics-commons-*-src.tar.gz
+/*.src.rpm
diff --git a/jdk25.patch b/jdk25.patch
new file mode 100644
index 0000000..2b6713a
--- /dev/null
+++ b/jdk25.patch
@@ -0,0 +1,12 @@
+--- xmlgraphics-commons-2.11/src/main/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderRawJPEG.java
++++ xmlgraphics-commons-2.11/src/main/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderRawJPEG.java
+@@ -228,7 +228,7 @@
+ if (padding != 0) {
+ try {
+ iccStream.write(new byte[padding]);
+- } catch (IOException ioe) {
++ } catch (Exception ioe) {
+ throw new IOException("Error while aligning ICC stream: " + ioe.getMessage());
+ }
+ }
+
diff --git a/sources b/sources
index ce1b97e..1bba186 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-d2b56a1671d2ca63480e38acd9629ea7 xmlgraphics-commons-1.4-src.tar.gz
+SHA512 (xmlgraphics-commons-2.11-src.tar.gz) = 2249a1ca0ee26522d0a8f34af96791611dfe849278ad98b2f5a571fde662a8eef7f2594f6929f2414f57e0bcd286ed14192471556fb29c9355cb046e9c806e0c
diff --git a/xmlgraphics-commons-java-7-fix.patch b/xmlgraphics-commons-java-7-fix.patch
deleted file mode 100644
index cc83a93..0000000
--- a/xmlgraphics-commons-java-7-fix.patch
+++ /dev/null
@@ -1,1052 +0,0 @@
-diff -r 5073426893de xmlgraphics-commons-1.4/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java
---- src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java Tue Feb 21 12:29:55 2012 +0100
-+++ src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java Tue Feb 21 12:50:48 2012 +0100
-@@ -15,7 +15,7 @@
- * limitations under the License.
- */
-
--/* $Id: TIFFImage.java 750418 2009-03-05 11:03:54Z vhennebert $ */
-+/* $Id$ */
-
- package org.apache.xmlgraphics.image.codec.tiff;
-
-@@ -35,7 +35,6 @@
- import java.awt.image.Raster;
- import java.awt.image.SampleModel;
- import java.awt.image.WritableRaster;
--import java.io.ByteArrayInputStream;
- import java.io.IOException;
- import java.util.HashMap;
- import java.util.Map;
-@@ -46,10 +45,6 @@
- import org.apache.xmlgraphics.image.rendered.AbstractRed;
- import org.apache.xmlgraphics.image.rendered.CachableRed;
-
--import com.sun.image.codec.jpeg.JPEGCodec;
--import com.sun.image.codec.jpeg.JPEGDecodeParam;
--import com.sun.image.codec.jpeg.JPEGImageDecoder;
--
- public class TIFFImage extends AbstractRed {
-
- // Compression types
-@@ -101,10 +96,6 @@
- // LZW compression related variable
- int predictor;
-
-- // TTN2 JPEG related variables
-- JPEGDecodeParam decodeParam = null;
-- boolean colorConvertJPEG = false;
--
- // DEFLATE variables
- Inflater inflater = null;
-
-@@ -123,46 +114,6 @@
- private TIFFLZWDecoder lzwDecoder = null;
-
- /**
-- * Decode a buffer of data into a Raster with the specified location.
-- *
-- * @param data buffer contain an interchange or abbreviated datastream.
-- * @param decodeParam decoding parameters; may be null unless the
-- * data buffer contains an abbreviated datastream in which case
-- * it may not be null or an error will occur.
-- * @param colorConvert whether to perform color conversion; in this
-- * case that would be limited to YCbCr-to-RGB.
-- * @param minX the X position of the returned Raster.
-- * @param minY the Y position of the returned Raster.
-- */
-- private static final Raster decodeJPEG(byte[] data,
-- JPEGDecodeParam decodeParam,
-- boolean colorConvert,
-- int minX,
-- int minY) {
-- // Create an InputStream from the compressed data array.
-- ByteArrayInputStream jpegStream = new ByteArrayInputStream(data);
--
-- // Create a decoder.
-- JPEGImageDecoder decoder = decodeParam == null ?
-- JPEGCodec.createJPEGDecoder(jpegStream) :
-- JPEGCodec.createJPEGDecoder(jpegStream,
-- decodeParam);
--
-- // Decode the compressed data into a Raster.
-- Raster jpegRaster;
-- try {
-- jpegRaster = colorConvert ?
-- decoder.decodeAsBufferedImage().getWritableTile(0, 0) :
-- decoder.decodeAsRaster();
-- } catch (IOException ioe) {
-- throw new RuntimeException("TIFFImage13");
-- }
--
-- // Translate the decoded Raster to the specified location and return.
-- return jpegRaster.createTranslatedChild(minX, minY);
-- }
--
-- /**
- * Inflates deflated into inflated using the
- * Inflater constructed during class instantiation.
- */
-@@ -170,8 +121,8 @@
- inflater.setInput(deflated);
- try {
- inflater.inflate(inflated);
-- } catch(DataFormatException dfe) {
-- throw new RuntimeException("TIFFImage17"+": "+
-+ } catch (DataFormatException dfe) {
-+ throw new RuntimeException("TIFFImage17" + ": " +
- dfe.getMessage());
- }
- inflater.reset();
-@@ -180,26 +131,27 @@
- private static SampleModel createPixelInterleavedSampleModel
- (int dataType, int tileWidth, int tileHeight, int bands) {
- int [] bandOffsets = new int[bands];
-- for (int i=0; i> 4);
- data[dstCount++] =
-@@ -1278,15 +1167,15 @@
- }
- }
-
-- int len = colormap.length/3;
-- int len2 = len*2;
-+ int len = colormap.length / 3;
-+ int len2 = len * 2;
- int cmapValue, lookup;
- int count = 0;
-- for (int i=0; i= 0 && b <= 127) {
-
- // literal run packet
-- for (int i=0; i<(b + 1); i++) {
-+ for (int i = 0; i < (b + 1); i++) {
- dst[dstCount++] = data[srcCount++];
- }
-
-@@ -1750,7 +1635,7 @@
-
- // 2 byte encoded run packet
- repeat = data[srcCount++];
-- for (int i=0; i<(-b + 1); i++) {
-+ for (int i = 0; i < (-b + 1); i++) {
- dst[dstCount++] = repeat;
- }
-
-@@ -1803,7 +1688,7 @@
- }
-
- RGBBits = new int[numBands];
-- for(int i = 0; i < numBands; i++) {
-+ for (int i = 0; i < numBands; i++) {
- RGBBits[i] = componentSize;
- }
-
-diff -r 5073426893de xmlgraphics-commons-1.4/src/java/org/apache/xmlgraphics/java2d/ps/PSTilingPattern.java
---- src/java/org/apache/xmlgraphics/java2d/ps/PSTilingPattern.java Tue Feb 21 12:29:55 2012 +0100
-+++ src/java/org/apache/xmlgraphics/java2d/ps/PSTilingPattern.java Tue Feb 21 12:50:48 2012 +0100
-@@ -51,7 +51,7 @@
- protected String patternName = null;
-
- /**
-- * The XUID is an extended unique ID — an array of integers that provides for
-+ * The XUID is an extended unique ID � an array of integers that provides for
- * distributed, hierarchical management of the space of unique ID numbers
- * (optional)
- */
-@@ -65,7 +65,7 @@
- /**
- * An array of four numbers in the pattern coordinate system, giving
- * the coordinates of the left, bottom, right, and top edges, respectively, of the
-- * pattern cell’s bounding box
-+ * pattern cell's bounding box
- */
- protected Rectangle2D bBox = null;
-
-@@ -108,7 +108,7 @@
- * the name is null, the pattern should be stored in PSPatternStorage, where the pattern
- * gets a name (the pattern without name cannot be use in PS file)
- * @param paintProc a postscript procedure for painting the pattern cell
-- * @param bBox a pattern cell’s bounding box
-+ * @param bBox a pattern cell's bounding box
- * @param xStep the desired horizontal spacing between pattern cells
- * @param yStep the desired vertical spacing between pattern cells
- * @param paintType 1 for colored pattern, 2 for uncolored pattern
-@@ -192,7 +192,7 @@
- /**
- * Returns the bounding box.
- *
-- * @return a pattern cell’s bounding box
-+ * @return a pattern cell's bounding box
- */
- public Rectangle2D getBoundingBox() {
- return (this.bBox);
-@@ -201,7 +201,7 @@
- /**
- * Sets the bounding box.
- *
-- * @param bBox a pattern cell’s bounding box
-+ * @param bBox a pattern cell's bounding box
- */
- public void setBoundingBox(Rectangle2D bBox) {
- if (bBox == null) {
-@@ -392,9 +392,9 @@
- }
-
- // define color image: width height bits/comp matrix
-- // datasrc0 … datasrcncomp-1 multi ncomp colorimage
-+ // datasrc0 datasrcncomp-1 multi ncomp colorimage
- sb.append(width + " " + height + " 8 " + "matrix\n"); // width height bits/comp matrix
-- int [] argb = new int[width * height]; // datasrc0 … datasrcncomp-1
-+ int [] argb = new int[width * height]; // datasrc0 datasrcncomp-1
- sb.append("{<");
- texture.getImage().getRGB(0, 0, width, height, argb, 0, width);
- int count = 0;
diff --git a/xmlgraphics-commons.spec b/xmlgraphics-commons.spec
index 65c350e..8f86f5c 100644
--- a/xmlgraphics-commons.spec
+++ b/xmlgraphics-commons.spec
@@ -1,27 +1,24 @@
Name: xmlgraphics-commons
-Version: 1.4
-Release: 5%{?dist}
+Version: 2.11
+Release: 7%{?dist}
Epoch: 0
Summary: XML Graphics Commons
-Group: Development/Libraries
-License: ASL 2.0
+License: Apache-2.0
URL: http://xmlgraphics.apache.org/
-Source0: http://apache.skknet.net/xmlgraphics/commons/source/%{name}-%{version}-src.tar.gz
-Patch0: %{name}-java-7-fix.patch
+Source0: http://archive.apache.org/dist/xmlgraphics/commons/source/xmlgraphics-commons-%{version}-src.tar.gz
+Patch1: jdk25.patch
BuildArch: noarch
-BuildRequires: java-devel >= 1:1.6.0
-BuildRequires: jpackage-utils >= 0:1.6
-BuildRequires: ant >= 0:1.6
-BuildRequires: ant-junit >= 0:1.6
-BuildRequires: junit
-BuildRequires: apache-commons-io >= 0:1.1
-BuildRequires: apache-commons-logging >= 0:1.0.4
-Requires: apache-commons-logging >= 0:1.0.4
-Requires: apache-commons-io >= 0:1.1
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
+ExclusiveArch: %{java_arches} noarch
+
+BuildRequires: maven-local-openjdk25
+BuildRequires: mvn(commons-io:commons-io)
+BuildRequires: mvn(commons-logging:commons-logging)
+BuildRequires: mvn(junit:junit)
+BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
+BuildRequires: mvn(org.mockito:mockito-core)
+BuildRequires: mvn(xml-resolver:xml-resolver)
%description
Apache XML Graphics Commons is a library that consists of
@@ -32,60 +29,190 @@ find components such as a PDF library, an RTF library,
Graphics2D implementations that let you generate PDF &
PostScript files, and much more.
-%package javadoc
-Summary: Javadoc for %{name}
-Group: Documentation
-Requires: jpackage-utils
-
-%description javadoc
-%{summary}.
+%package javadoc
+Summary: Javadoc for %{name}
+%description javadoc
+This package contains API documentation for %{name}.
%prep
%setup -q %{name}-%{version}
-rm -f `find . -name "*.jar"`
-%patch0
+patch -p1 < %{PATCH1}
+find -name "*.jar" -delete
-# create pom from template
-sed "s:@version@:%{version}:g" %{name}-pom-template.pom \
- > %{name}.pom
+# Disable plugins not needed for RPM build
+%pom_remove_plugin :maven-checkstyle-plugin
+# Make into OSGi bundle
+%pom_xpath_inject pom:project 'bundle'
+%pom_add_plugin org.apache.felix:maven-bundle-plugin . \
+" true
+
+
+ org.apache.xmlgraphics
+
+ "
%build
-export CLASSPATH=$(build-classpath commons-logging)
-export OPT_JAR_LIST="ant/ant-junit junit"
-pushd lib
-ln -sf $(build-classpath commons-io) .
-popd
-ant package javadocs
+%mvn_file : %{name}
+%mvn_build
%install
-install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
-install -Dpm 0644 build/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
-install -pm 644 %{name}.pom $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
-%add_to_maven_depmap org.apache.xmlgraphics %{name} %{version} JPP %{name}
+%mvn_install
-install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-cp -pr build/javadocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
-
-%files
-%doc LICENSE NOTICE README
-%{_mavendepmapfragdir}/%{name}
-%{_mavenpomdir}/JPP-%{name}.pom
-%{_javadir}/*.jar
-
-%files javadoc
-%doc LICENSE NOTICE
-%doc %{_javadocdir}/%{name}
+%files -f .mfiles
+%license LICENSE NOTICE
+%doc README
+%files javadoc -f .mfiles-javadoc
+%license LICENSE NOTICE
%changelog
+* Fri Jul 17 2026 Fedora Release Engineering - 0:2.11-7
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
+
+* Sat Jan 17 2026 Fedora Release Engineering - 0:2.11-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
+
+* Wed Jul 30 2025 jiri vanek - 0:2.11-4
+- Rrevert to jdk21
+
+* Tue Jul 29 2025 jiri vanek - 0:2.11-3
+- Rebuilt for java-25-openjdk as preffered jdk
+
+* Fri Jul 25 2025 Fedora Release Engineering - 0:2.11-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
+
+* Tue May 06 2025 Gwyn Ciesla - 0:2.11-1
+- 2.11
+
+* Sun Jan 19 2025 Fedora Release Engineering - 0:2.10-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
+
+* Wed Oct 09 2024 Gwyn Ciesla - 0:2.10-1
+- 2.10
+
+* Sat Jul 20 2024 Fedora Release Engineering - 0:2.9-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
+
+* Tue Feb 27 2024 Jiri Vanek - 0:2.9-3
+- Rebuilt for java-21-openjdk as system jdk
+
+* Sat Jan 27 2024 Fedora Release Engineering - 0:2.9-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
+
+* Wed Aug 23 2023 Gwyn Ciesla - 0:2.9-1
+- 2.9
+
+* Sat Jul 22 2023 Fedora Release Engineering - 0:2.8-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
+
+* Thu Mar 02 2023 Gwyn Ciesla - 0:2.8-3
+- migrated to SPDX license
+
+* Sat Jan 21 2023 Fedora Release Engineering - 0:2.8-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
+
+* Wed Nov 09 2022 Gwyn Ciesla - 0:2.8-1
+- 2.8
+
+* Sat Jul 23 2022 Fedora Release Engineering - 0:2.7-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
+
+* Fri Jul 08 2022 Jiri Vanek - 0:2.7-3
+- Rebuilt for Drop i686 JDKs
+
+* Sat Feb 05 2022 Jiri Vanek - 0:2.7-2
+- Rebuilt for java-17-openjdk as system jdk
+
+* Mon Jan 24 2022 Gwyn Ciesla - 0:2.7-1
+- 2.7
+
+* Sat Jan 22 2022 Fedora Release Engineering - 0:2.6-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+
+* Fri Jul 23 2021 Fedora Release Engineering - 0:2.6-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
+
+* Mon Mar 01 2021 Jie Kang - 0:2.6-1
+- Update to latest upstream release
+
+* Thu Jan 28 2021 Fedora Release Engineering - 0:2.4-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+
+* Sun Nov 01 2020 Mat Booth - 0:2.4-1
+- Update to latest upstream release
+
+* Wed Jul 29 2020 Fedora Release Engineering - 0:2.3-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+
+* Sat Jul 11 2020 Jiri Vanek - 0:2.3-4
+- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
+
+* Fri Jan 31 2020 Fedora Release Engineering - 0:2.3-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
+* Sat Jul 27 2019 Fedora Release Engineering - 0:2.3-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
+* Wed May 15 2019 Mat Booth - 0:2.3-1
+- Update to latest upstream release
+
+* Sun Feb 03 2019 Fedora Release Engineering - 0:2.2-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+
+* Sat Jul 14 2018 Fedora Release Engineering - 0:2.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
+* Thu Apr 26 2018 Mat Booth - 0:2.2-1
+- Update to latest release
+- Switch to maven-based build
+- Add OSGi metadata
+
+* Fri Feb 09 2018 Fedora Release Engineering - 0:2.0.1-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+
+* Tue Jan 16 2018 Michael Simacek - 0:2.0.1-5
+- Install with XMvn
+
+* Thu Jul 27 2017 Fedora Release Engineering - 0:2.0.1-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
+
+* Sat Feb 11 2017 Fedora Release Engineering - 0:2.0.1-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
+
+* Fri Feb 05 2016 Fedora Release Engineering - 0:2.0.1-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
+
+* Tue Jul 14 2015 Michael Simacek - 0:2.0.1-1
+- Update to upstream version 2.0.1
+
+* Fri Jun 19 2015 Fedora Release Engineering - 0:2.0-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
+
+* Fri Jan 30 2015 Rüdiger Landmann - 0:2.0-1
+- Rebase on new upstream
+
+* Mon Aug 4 2014 Mikolaj Izdebski - 0:1.5-4
+- Update to current packaging guidelines
+- Resolves: rhbz#1107290
+
+* Sun Jun 08 2014 Fedora Release Engineering - 0:1.5-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* Sun Aug 04 2013 Fedora Release Engineering - 0:1.5-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Tue Mar 19 2013 Mat Booth - 0:1.5-1
+- Update to 1.5, rhbz #895934
+- Drop unneeded patch
+
+* Fri Feb 15 2013 Fedora Release Engineering - 0:1.4-7
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Sun Jul 22 2012 Fedora Release Engineering - 0:1.4-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
* Tue Mar 06 2012 Deepak Bhole 1.4-5
- Added dist to the release tag