diff --git a/pom-3.8.patch b/pom-3.8.patch
deleted file mode 100644
index cfd0f15..0000000
--- a/pom-3.8.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-diff --git a/pom.xml b/pom.xml
-index cfabbe5..b3f0a12 100644
---- a/pom.xml
-+++ b/pom.xml
-@@ -24,12 +24,6 @@
-
- 4.0.0
-
--
-- org.apache.geronimo.genesis
-- genesis-java5-flava
-- 2.0
--
--
- org.apache.xbean
- xbean
- Apache XBean
-@@ -259,39 +253,15 @@
-
-
-
-- mx4j
-- mx4j
-- 3.0.1
--
--
--
-- org.springframework
-- spring-beans
-- 2.5.6
--
--
--
-- org.springframework
-- spring-context
-- 2.5.6
--
--
--
-- org.springframework
-- spring-web
-- 2.5.6
--
--
--
- com.thoughtworks.qdox
- qdox
- 1.6.3
-
--
-+
-
- org.slf4j
- slf4j-api
-- 1.5.11
-+ 1.5.11
-
-
-
-@@ -343,22 +313,22 @@
- org.apache.felix
- maven-bundle-plugin
-
-+
-+ maven-compiler-plugin
-+
-+
-+ 1.5
-+
-+
-
-
-
-
-- xbean-classloader
- xbean-classpath
- xbean-bundleutils
- xbean-finder
- xbean-naming
- xbean-reflect
-- xbean-blueprint
-- xbean-spring
-- xbean-telnet
-- maven-xbean-plugin
-- xbean-asm-shaded
-- xbean-finder-shaded
-
-
-
-@@ -424,4 +394,4 @@
-
-
-
--
-\ No newline at end of file
-+
-diff --git a/xbean-reflect/pom.xml b/xbean-reflect/pom.xml
-index b2a76b2..3985b46 100644
---- a/xbean-reflect/pom.xml
-+++ b/xbean-reflect/pom.xml
-@@ -47,13 +47,6 @@
- true
-
-
-- org.apache.xbean
-- xbean-asm-shaded
-- 3.8
-- provided
-- true
--
--
- log4j
- log4j
- 1.2.12
diff --git a/xbean.spec b/xbean.spec
index cb08333..557f1b3 100644
--- a/xbean.spec
+++ b/xbean.spec
@@ -16,8 +16,6 @@ URL: http://geronimo.apache.org/xbean/
Source0: xbean-%{version}.tar.xz
Source1: xbean.depmap
-Patch0: pom-%{version}.patch
-
BuildRequires: java-devel
BuildRequires: apache-commons-beanutils
BuildRequires: apache-commons-logging
@@ -70,11 +68,28 @@ Requires: jpackage-utils
# build failing on this due to doxia-sitetools problems
rm src/site/site.xml
-# removes dependency on springframework and prevents building of
-# modules depending on it. If other modules are required,
-# springframework will have to be brought in first
-%patch0 -p1
-
+%pom_xpath_remove "pom:parent"
+%pom_remove_dep org.springframework:
+%pom_remove_dep mx4j:mx4j
+%pom_remove_dep :xbean-asm-shaded xbean-reflect
+
+# Prevent modules depending on springframework from building.
+%pom_disable_module xbean-asm-shaded
+%pom_disable_module xbean-blueprint
+%pom_disable_module xbean-classloader
+%pom_disable_module xbean-finder-shaded
+%pom_disable_module xbean-spring
+%pom_disable_module xbean-telnet
+%pom_disable_module maven-xbean-plugin
+
+%pom_xpath_inject "pom:build/pom:plugins" "
+
+ maven-compiler-plugin
+
+
+ 1.5
+
+ "
# Fix dependency on xbean-asm-shaded to original objectweb-asm
sed -i 's/org.apache.xbean.asm/org.objectweb.asm/' \