diff --git a/RELEASE_3_1.tar.gz b/RELEASE_3_1.tar.gz
deleted file mode 100644
index 2bcc43c..0000000
--- a/RELEASE_3_1.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a48c857232b902950cbd7c6b07bd70bfcc3773b9d4dd188f35f885c4477b8d3b
-size 1417623
diff --git a/RELEASE_3_2_4.tar.gz b/RELEASE_3_2_4.tar.gz
new file mode 100644
index 0000000..900328e
--- /dev/null
+++ b/RELEASE_3_2_4.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3844585a66ccb75de440a6773dae29d9d86b8ccb0aba7c5154e658ea48db4d98
+size 146659
diff --git a/cglib-3.1.pom b/cglib-3.1.pom
deleted file mode 100644
index e62d8e3..0000000
--- a/cglib-3.1.pom
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
- 4.0.0
- cglib
- cglib
- Code Generation Library
- 3.1
- http://cglib.sourceforge.net/
- Code generation library
-
-
- ASF 2.0
- http://www.apache.org/licenses/LICENSE-2.0.txt
- repo
-
-
-
- scm:cvs:pserver:anonymous@cglib.cvs.sourceforge.net:/cvsroot/cglib:cglib
- http://cglib.cvs.sourceforge.net/cglib
-
-
-
- org.ow2.asm
- asm
- 4.2
-
-
- org.ow2.asm
- asm-util
- 4.2
- true
-
-
- ant
- ant
- 1.6.2
- true
-
-
-
-
- baliuka
- Juozas Baliuka
-
-
- herbyderby
- Chris Nokleberg
-
-
- sameb
- Sam Berlin
-
-
-
diff --git a/cglib-3.2.4-build.tar.xz b/cglib-3.2.4-build.tar.xz
new file mode 100644
index 0000000..fc08566
--- /dev/null
+++ b/cglib-3.2.4-build.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:faab2e7299b87d2c26d9f6ffed65abc6042855a4bcfbc1e1fcfcd61c2ea4d619
+size 2872
diff --git a/cglib-build_xml.patch b/cglib-build_xml.patch
deleted file mode 100644
index 34b6bbf..0000000
--- a/cglib-build_xml.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- cglib/build.xml 2013-12-07 17:08:18.000000000 +0100
-+++ cglib/build.xml 2018-10-29 15:10:26.294707872 +0100
-@@ -123,15 +123,6 @@
-
-
-
--
--
--
--
--
--
--
--
--
-
-
-
diff --git a/cglib.changes b/cglib.changes
index d071711..91170be 100644
--- a/cglib.changes
+++ b/cglib.changes
@@ -1,3 +1,13 @@
+-------------------------------------------------------------------
+Tue Mar 5 12:15:26 UTC 2019 - Fridrich Strba
+
+- Upgrade to upstream 3.2.4
+- Generate and customize ant build system
+- Removed patches:
+ * cglib-build_xml.patch
+ * fix-javadoc.patch
+ + Not needed any more
+
-------------------------------------------------------------------
Tue Dec 11 12:27:40 UTC 2018 - Fridrich Strba
diff --git a/cglib.spec b/cglib.spec
index 78c6982..4675396 100644
--- a/cglib.spec
+++ b/cglib.spec
@@ -1,7 +1,7 @@
#
# spec file for package cglib
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,28 +16,30 @@
#
-%global tarball_name RELEASE_3_1
+%bcond_with tests
+%global tarball_name RELEASE_3_2_4
Name: cglib
-Version: 3.1
+Version: 3.2.4
Release: 0
Summary: Code Generation Library
License: Apache-2.0
Group: Development/Libraries/Java
URL: http://cglib.sourceforge.net/
Source0: https://github.com/cglib/cglib/archive/%{tarball_name}.tar.gz
-Source1: http://central.maven.org/maven2/%{name}/%{name}/%{version}/%{name}-%{version}.pom
-# Remove the repackaging step that includes other jars into the final thing
-Patch0: %{name}-build_xml.patch
-Patch1: fix-javadoc.patch
+Source1: %{name}-%{version}-build.tar.xz
BuildRequires: ant >= 1.6
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
-# Needed for maven conversions
BuildRequires: javapackages-local
BuildRequires: objectweb-asm >= 5
Provides: %{name}-nohook = %{version}-%{release}
Obsoletes: %{name}-nohook < %{version}-%{release}
+Requires: mvn(org.ow2.asm:asm)
BuildArch: noarch
+%if %{with tests}
+BuildConflicts: java-devel >= 9
+BuildRequires: ant-junit
+%endif
%description
cglib is a powerful, high performance and quality Code Generation
@@ -46,7 +48,7 @@ runtime.
%package javadoc
Summary: Code Generation Library
-Group: Development/Libraries/Java
+Group: Documentation/HTML
%description javadoc
cglib is a powerful, high performance and quality Code Generation
@@ -54,38 +56,66 @@ Library, It is used to extend JAVA classes and implements interfaces at
runtime.
%prep
-%setup -q -n %{name}-%{tarball_name}
-rm lib/*.jar
-build-jar-repository -s -p lib objectweb-asm ant
-%patch0 -p1
-%patch1 -p1
+%setup -q -n %{name}-%{tarball_name} -a1
+
+%pom_disable_module cglib-nodep
+%pom_disable_module cglib-integration-test
+%pom_disable_module cglib-jmh
+%pom_xpath_set pom:packaging 'bundle' cglib
+%pom_xpath_inject pom:build/pom:plugins '
+ org.apache.felix
+ maven-bundle-plugin
+ 1.4.0
+ true
+
+
+ net.sf.cglib.core
+ net.*
+ org.apache.tools.*;resolution:=optional,*
+
+
+ ' cglib
+%pom_remove_plugin org.apache.maven.plugins:maven-gpg-plugin
+%pom_remove_plugin org.apache.maven.plugins:maven-jarsigner-plugin cglib-sample
+%pom_remove_plugin -r :maven-javadoc-plugin
+
+%pom_xpath_inject "pom:dependency[pom:artifactId='ant']" "true" cglib
+
+%pom_remove_parent
%build
-ant \
- -Dcompile.target=8 -Dcompile.source=8 \
- jar javadoc
+mkdir -p lib
+build-jar-repository -s -p lib objectweb-asm/asm ant/ant ant/ant-launcher
+%ant \
+%if %{without tests}
+ -Dtest.skip=true \
+%endif
+ -Dcompiler.target=1.8 -Dcompiler.source=1.8 \
+ package javadoc
%install
+
# jars
-mkdir -p %{buildroot}%{_javadir}
-cp -p dist/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
+install -dm 0755 %{buildroot}%{_javadir}/%{name}
+install -pm 0644 %{name}/target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar
+install -pm 0644 %{name}-sample/target/%{name}-sample-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}-sample.jar
+
+# poms
+install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
+install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}-parent.pom
+%add_maven_depmap %{name}/%{name}-parent.pom
+install -pm 0644 %{name}/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom
+%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar -a "net.sf.cglib:cglib,cglib:cglib-full,cglib:cglib-nodep,org.sonatype.sisu.inject:cglib"
+install -pm 0644 %{name}-sample/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}-sample.pom
+%add_maven_depmap %{name}/%{name}-sample.pom %{name}/%{name}-sample.jar
# javadoc
-mkdir -p %{buildroot}%{_javadocdir}/
-cp -r docs %{buildroot}%{_javadocdir}/%{name}
-%fdupes -s %{buildroot}%{_javadocdir}/%{name}
+install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
+cp -r %{name}/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
+%fdupes -s %{buildroot}%{_javadocdir}
-#maven pom
-install -dm 755 %{buildroot}%{_mavenpomdir}
-install -pm 0644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/%{name}.pom
-%add_maven_depmap %{name}.pom %{name}.jar -a "net.sf.cglib:cglib,cglib:cglib-full,cglib:cglib-nodep,org.sonatype.sisu.inject:cglib"
-
-%files
-%license LICENSE
-%doc NOTICE
-%{_javadir}/*.jar
-%{_mavenpomdir}/*
-%config(noreplace) %{_datadir}/maven-metadata/%{name}.xml
+%files -f .mfiles
+%license LICENSE NOTICE
%files javadoc
%{_javadocdir}/%{name}
diff --git a/fix-javadoc.patch b/fix-javadoc.patch
deleted file mode 100644
index d0a65fb..0000000
--- a/fix-javadoc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -urEbwB cglib/src/proxy/net/sf/cglib/reflect/MethodDelegate.java cglib/src/proxy/net/sf/cglib/reflect/MethodDelegate.java
---- cglib/src/proxy/net/sf/cglib/reflect/MethodDelegate.java 2013-12-07 17:08:18.000000000 +0100
-+++ cglib/src/proxy/net/sf/cglib/reflect/MethodDelegate.java 2018-10-29 15:15:55.528397043 +0100
-@@ -16,7 +16,6 @@
- package net.sf.cglib.reflect;
-
- import java.lang.reflect.*;
--import net.sf.cglib.*;
- import net.sf.cglib.core.*;
- import org.objectweb.asm.ClassVisitor;
- import org.objectweb.asm.Type;