diff --git a/xstream.spec b/xstream.spec
index 32ad51508e5a23d3ff336992363aedfec30a6a67..f48716c814cd0105c0870d5c0ab957eae950529e 100644
--- a/xstream.spec
+++ b/xstream.spec
@@ -1,88 +1,94 @@
-Name: xstream
-Version: 1.4.9
-Release: 9
-Summary: A simple library to serialize objects to XML and back again
-License: BSD
-URL: http://x-stream.github.io/
-Source0: https://repo1.maven.org/maven2/com/thoughtworks/%{name}/%{name}-distribution/%{version}/%{name}-distribution-%{version}-src.zip
-Patch0: 0001-Prevent-deserialization-of-void.patch
-BuildArch: noarch
-
-BuildRequires: maven-local, mvn(cglib:cglib), mvn(dom4j:dom4j), mvn(javassist:javassist), mvn(joda-time:joda-time), mvn(org.slf4j:slf4j-simple)
-BuildRequires: mvn(net.sf.kxml:kxml2), mvn(net.sf.kxml:kxml2-min), mvn(org.apache.felix:maven-bundle-plugin), mvn(stax:stax), mvn(stax:stax-api)
-BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin), mvn(org.codehaus.jettison:jettison), mvn(xom:xom), mvn(xpp3:xpp3)
-BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin), mvn(org.codehaus.woodstox:woodstox-core-asl), mvn(xpp3:xpp3_min)
-BuildRequires: mvn(org.hibernate:hibernate-core), mvn(org.hibernate:hibernate-envers), mvn(org.jdom:jdom), mvn(org.jdom:jdom2)
-Provides: %{name}-javadoc%{?_isa} %{name}-javadoc
-Obsoletes: %{name}-javadoc
-Provides: %{name}-hibernate%{?_isa} %{name}-hibernate
-Obsoletes: %{name}-hibernate
-Provides: %{name}-benchmark%{?_isa} %{name}-benchmark
-Obsoletes: %{name}-benchmark
-Provides: %{name}-parent%{?_isa} %{name}-parent
-Obsoletes: %{name}-parent
+Name: xstream
+Version: 1.4.9
+Release: 9
+Summary: Java XML serialization library
+License: BSD
+URL: http://x-stream.github.io/
+BuildArch: noarch
+
+Source0: http://repo1.maven.org/maven2/com/thoughtworks/%{name}/%{name}-distribution/%{version}/%{name}-distribution-%{version}-src.zip
+
+# https://github.com/x-stream/xstream/commit/b3570be2f39234e61f99f9a20640756ea71b1b40
+Patch0: 0001-Prevent-deserialization-of-void.patch
+
+BuildRequires: maven-local mvn(cglib:cglib) mvn(dom4j:dom4j) mvn(javassist:javassist)
+BuildRequires: mvn(joda-time:joda-time) mvn(net.sf.kxml:kxml2) mvn(net.sf.kxml:kxml2-min)
+BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
+BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
+BuildRequires: mvn(org.codehaus.jettison:jettison)
+BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
+BuildRequires: mvn(org.codehaus.woodstox:woodstox-core-asl)
+BuildRequires: mvn(org.hibernate:hibernate-core) mvn(org.hibernate:hibernate-envers)
+BuildRequires: mvn(org.jdom:jdom) mvn(org.jdom:jdom2) mvn(org.slf4j:slf4j-simple)
+BuildRequires: mvn(stax:stax) mvn(stax:stax-api) mvn(xom:xom) mvn(xpp3:xpp3)
+BuildRequires: mvn(xpp3:xpp3_min)
+
%description
-XStream is a simple library to serialize objects to XML and back again, which has the following features:
-Ease of use. A high level facade is supplied that simplifies common use cases.
-No mappings required. Most objects can be serialized without need for specifying mappings.
-Performance. Speed and low memory footprint are a crucial part of the design, making it suitable for large
-object graphs or systems with high message throughput.
-Clean XML. No information is duplicated that can be obtained via reflection. This results in XML that is
-easier to read for humans and more compact than native Java serialization.
-Requires no modifications to objects. Serializes internal fields, including private and final. Supports
-non-public and inner classes. Classes are not required to have default constructor.
-Full object graph support. Duplicate references encountered in the object-model will be maintained. Supports
-circular references.
-Integrates with other XML APIs. By implementing an interface, XStream can serialize directly to/from any
-tree structure (not just XML).
-Customizable conversion strategies. Strategies can be registered allowing customization of how particular
-types are represented as XML.
-Security framework. Fine-control about the unmarshalled types to prevent security issues with manipulated input.
-Error messages. When an exception occurs due to malformed XML, detailed diagnostics are provided to help isolate
-and fix the problem.
-Alternative output format. The modular design allows other output formats. XStream ships currently with JSON
-support and morphing.
+XStream is a simple library to serialize objects to XML and back again.
+
+%package javadoc
+Summary: Javadoc for %{name}
+
+%description javadoc
+%{name} API documentation.
+
+%package hibernate
+Summary: hibernate module for %{name}
+Requires: %{name} = %{version}-%{release}
+
+%description hibernate
+hibernate module for %{name}.
+
+%package benchmark
+Summary: benchmark module for %{name}
+Requires: %{name} = %{version}-%{release}
+
+%description benchmark
+benchmark module for %{name}.
+
+%package parent
+Summary: Parent POM for %{name}
+Requires: %{name} = %{version}-%{release}
+
+%description parent
+Parent POM for %{name}.
+
%prep
-%autosetup -n %{name}-%{version} -p1
-find . -name "*.jar" -print -delete
-find . -name "*.class" -print -delete
+%setup -qn %{name}-%{version}
+find . \( -name "*.class" -o -name "*.jar" \) -print -delete
+
+%patch0 -p1
%pom_xpath_remove "pom:project/pom:build/pom:extensions"
-%pom_disable_module xstream-jmh
+
%pom_disable_module xstream-distribution
+%pom_disable_module xstream-jmh
+
+%pom_remove_plugin :xsite-maven-plugin
+%pom_remove_plugin :jxr-maven-plugin
%pom_remove_plugin :maven-source-plugin
-%pom_remove_plugin :maven-eclipse-plugin
%pom_remove_plugin :maven-dependency-plugin
+%pom_remove_plugin :maven-eclipse-plugin
%pom_remove_plugin :maven-release-plugin
-%pom_remove_plugin :jxr-maven-plugin
-%pom_remove_plugin :xsite-maven-plugin
-
-%pom_xpath_set "pom:dependency[pom:groupId = 'org.codehaus.woodstox' ]/pom:artifactId" \
-woodstox-core-asl
-%pom_xpath_set "pom:dependency[pom:groupId = 'org.codehaus.woodstox' ]/pom:artifactId" \
-woodstox-core-asl xstream
-%pom_xpath_set "pom:dependency[pom:groupId = 'cglib' ]/pom:artifactId" \
-cglib
-%pom_xpath_set "pom:dependency[pom:groupId = 'cglib' ]/pom:artifactId" \
-cglib xstream
+%pom_xpath_set "pom:dependency[pom:groupId = 'org.codehaus.woodstox' ]/pom:artifactId" woodstox-core-asl
+%pom_xpath_set "pom:dependency[pom:groupId = 'org.codehaus.woodstox' ]/pom:artifactId" woodstox-core-asl xstream
+%pom_xpath_set "pom:dependency[pom:groupId = 'cglib' ]/pom:artifactId" cglib
+%pom_xpath_set "pom:dependency[pom:groupId = 'cglib' ]/pom:artifactId" cglib xstream
%pom_change_dep :xmlpull xpp3:xpp3:1.1.4c xstream
-%pom_remove_plugin :maven-javadoc-plugin xstream
%pom_remove_plugin :maven-dependency-plugin xstream
+%pom_remove_plugin :maven-javadoc-plugin xstream
%pom_remove_dep javax.activation:activation xstream
-%pom_xpath_set "pom:project/pom:dependencies/pom:dependency[pom:groupId = 'cglib' ]/pom:artifactId" \
-cglib xstream-hibernate
-%pom_xpath_inject "pom:project/pom:dependencies/pom:dependency[pom:groupId = 'junit' ]" \
-"test" xstream-hibernate
+%pom_xpath_set "pom:project/pom:dependencies/pom:dependency[pom:groupId = 'cglib' ]/pom:artifactId" cglib xstream-hibernate
+%pom_xpath_inject "pom:project/pom:dependencies/pom:dependency[pom:groupId = 'junit' ]" "test" xstream-hibernate
%pom_remove_plugin :maven-dependency-plugin xstream-hibernate
%pom_remove_plugin :maven-javadoc-plugin xstream-hibernate
-%pom_xpath_inject "pom:project/pom:dependencies/pom:dependency[pom:groupId = 'junit' ]" \
-"test" xstream-benchmark
+%pom_xpath_inject "pom:project/pom:dependencies/pom:dependency[pom:groupId = 'junit' ]" "test" xstream-benchmark
%pom_remove_plugin :maven-javadoc-plugin xstream-benchmark
%mvn_file :%{name} %{name}/%{name} %{name}
@@ -97,12 +103,16 @@ cglib xstream-hibernate
%mvn_install
%files -f .mfiles
-%doc README.txt
-%license LICENSE.txt
-%{_javadir}/*
-%{_javadocdir}/%{name}/*
-/usr/share/maven*
+%doc LICENSE.txt README.txt
+%dir %{_javadir}/%{name}
+%files parent -f .mfiles-%{name}-parent
+%files hibernate -f .mfiles-%{name}-hibernate
+%files benchmark -f .mfiles-%{name}-benchmark
+
+%files javadoc -f .mfiles-javadoc
+%doc LICENSE.txt
%changelog
-* Mon Dec 9 2019 openEuler Buildteam - 1.4.9-9
-- Package init
+* Thu Apr 9 2020 chenyanpan - 1.4.9-9
+- Initial packaging
+