Build with xmvn

This commit is contained in:
Michal Srb 2013-03-25 12:39:28 +01:00
parent 7be523ef7c
commit 01b15681ff

View File

@ -3,7 +3,7 @@
Name: httpcomponents-core
Summary: Set of low level Java HTTP transport components for HTTP services
Version: 4.2.4
Release: 1%{?dist}
Release: 2%{?dist}
Group: Development/Libraries
License: ASL 2.0
URL: http://hc.apache.org/
@ -21,11 +21,6 @@ BuildRequires: junit
BuildRequires: mockito
%endif
Requires: java >= 1:1.6.0
Requires: jpackage-utils
Requires: apache-commons-logging
Requires: junit
%description
HttpCore is a set of low level HTTP transport components that can be
used to build custom client and server side HTTP services with a
@ -42,7 +37,6 @@ HTTP connections in a resource efficient manner.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation
Requires: jpackage-utils
%description javadoc
%{summary}.
@ -56,6 +50,10 @@ Requires: jpackage-utils
%pom_remove_plugin :maven-notice-plugin
%pom_remove_plugin :docbkx-maven-plugin
# we don't need these artifacts right now
%pom_disable_module httpcore-osgi
%pom_disable_module httpcore-ab
# OSGify modules
for module in httpcore httpcore-nio; do
%pom_xpath_remove "pom:project/pom:packaging" $module
@ -73,49 +71,33 @@ for module in httpcore httpcore-nio; do
</plugin>" $module
done
# install JARs to httpcomponents/ for compatibility reasons
# several other packages expect to find the JARs there
%mvn_file ":{*}" httpcomponents/@1
%build
mvn-rpmbuild \
%mvn_build \
%if 0%{?rhel}
-Dmaven.test.skip=true \
-f
%endif
install javadoc:aggregate
%install
install -dm 755 %{buildroot}/%{_mavenpomdir}
install -dm 755 %{buildroot}/%{_javadir}/%{base_name}
%mvn_install
for m in httpcore httpcore-nio; do
# poms
install -pm 644 $m/pom.xml %{buildroot}/%{_mavenpomdir}/JPP.%{base_name}-$m.pom
# jars - osgi doesn't have one
if [ -f $m/target/$m-%{version}.jar ];then
install -m 644 $m/target/$m-%{version}.jar %{buildroot}%{_javadir}/%{base_name}/$m.jar
fi
%add_maven_depmap JPP.%{base_name}-$m.pom %{base_name}/$m.jar
done
# parent
install -pm 644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP.%{base_name}-%{name}.pom
%add_maven_depmap JPP.%{base_name}-%{name}.pom
# javadocs
install -dm 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
%files
%files -f .mfiles
%dir %{_javadir}/httpcomponents
%doc LICENSE.txt NOTICE.txt
%doc README.txt RELEASE_NOTES.txt
%{_mavendepmapfragdir}/%{name}
%{_mavenpomdir}/JPP.%{base_name}*.pom
%{_javadir}/%{base_name}
%files javadoc
%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt NOTICE.txt
%doc %{_javadocdir}/%{name}
%changelog
* Mon Mar 25 2013 Michal Srb <msrb@redhat.com> - 4.2.4-2
- Build with xmvn
* Mon Mar 25 2013 Michal Srb <msrb@redhat.com> - 4.2.4-1
- Update to upstream version 4.2.4