diff --git a/objenesis.spec b/objenesis.spec
index 442c9f9..ff32a51 100644
--- a/objenesis.spec
+++ b/objenesis.spec
@@ -31,7 +31,7 @@
Summary: A library for instantiating Java objects
Name: objenesis
Version: 3.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: ASL 2.0
URL: http://objenesis.org/
Source0: https://github.com/easymock/%{name}/archive/%{version}.tar.gz
@@ -86,9 +86,15 @@ This package contains the API documentation for %{name}.
%pom_xpath_remove "pom:dependency[pom:scope='test']" tck
%pom_xpath_remove pom:build/pom:extensions
+# Fix javadoc generation on java 11
+%pom_xpath_inject pom:pluginManagement/pom:plugins "
+maven-javadoc-plugin
+1.8
+"
+
%build
# tests are skipped because of missing dependency spring-osgi-test
-%mvn_build -- -Dyear=2009 -Dmaven.test.skip=true -Dmaven.javadoc.skip=true
+%mvn_build -- -Dyear=2009 -Dmaven.test.skip=true
%install
%mvn_install
@@ -97,11 +103,14 @@ This package contains the API documentation for %{name}.
%files -f .mfiles
%doc LICENSE.txt
-%files javadoc
+%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt
%changelog
+* Thu Jun 25 2020 Alexander Kurtakov 3.1-2
+- Fix build with Java 11.
+
* Mon May 04 2020 Jiri Vanek - 3.1-1
- bumped to 3.1
- disabled javadoc generation. It requires maven pomming beyond my skills