[apache-commons-configuration] Build with xmvn

Michal Srb msrb at fedoraproject.org
Tue Jan 15 15:49:05 UTC 2013


commit be53d277a49047487ef11e3bc4253e2723cd63c0
Author: Michal Srb <msrb at redhat.com>
Date:   Tue Jan 15 12:55:19 2013 +0100

    Build with xmvn

 apache-commons-configuration.spec |   45 +++++++++----------------------------
 1 files changed, 11 insertions(+), 34 deletions(-)
---
diff --git a/apache-commons-configuration.spec b/apache-commons-configuration.spec
index a121b2a..1fe3dab 100644
--- a/apache-commons-configuration.spec
+++ b/apache-commons-configuration.spec
@@ -4,7 +4,7 @@
 
 Name:           apache-%{short_name}
 Version:        1.9
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Commons Configuration Package
 
 Group:          Development/Libraries
@@ -13,9 +13,9 @@ URL:            http://commons.apache.org/%{base_name}/
 Source0:        http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
 BuildArch:      noarch
 
+BuildRequires:  xmvn >= 0.2.1
 BuildRequires:  java-devel
 BuildRequires:  jpackage-utils
-BuildRequires:  maven
 BuildRequires:  maven-antrun-plugin
 BuildRequires:  maven-assembly-plugin
 BuildRequires:  maven-compiler-plugin
@@ -42,19 +42,6 @@ BuildRequires:  apache-commons-vfs
 BuildRequires:  tomcat-servlet-3.0-api
 BuildRequires:  xml-commons-resolver
 
-Requires:       java
-Requires:       jpackage-utils
-Requires:       apache-commons-beanutils
-Requires:       apache-commons-codec
-Requires:       apache-commons-collections
-Requires:       apache-commons-digester
-Requires:       apache-commons-jexl
-Requires:       apache-commons-jxpath
-Requires:       apache-commons-lang
-Requires:       apache-commons-logging
-Requires:       apache-commons-vfs
-Requires:       tomcat-servlet-3.0-api
-Requires:       xml-commons-resolver
 
 Provides:       jakarta-%{short_name} = 0:%{version}-%{release}
 Obsoletes:      jakarta-%{short_name} < 0:%{version}-%{release}
@@ -90,35 +77,25 @@ Obsoletes:      jakarta-%{short_name}-javadoc < 0:%{version}-%{release}
 %{__sed} -i 's/\r//' LICENSE.txt NOTICE.txt
 
 %build
+%mvn_file   : %{short_name} %{name}
+%mvn_alias  : org.apache.commons:%{short_name}
 # We skip tests because we don't have test deps (dbunit in particular).
-mvn-rpmbuild -Dmaven.test.skip=true install javadoc:aggregate
+%mvn_build -f
 
 %install
-install -d -m 755 %{buildroot}%{_javadir}
-install -d -m 755 %{buildroot}%{_mavenpomdir}
-install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
-
-install -p -m 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
-ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
-install -p -m 644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP-%{name}.pom
-%add_maven_depmap -a org.apache.commons:%{short_name}
-
-cp -rp target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
+%mvn_install
 
-
-%files
+%files -f .mfiles
 %doc LICENSE.txt NOTICE.txt
-%{_javadir}/%{name}.jar
-%{_javadir}/%{short_name}.jar
-%{_mavendepmapfragdir}/%{name}
-%{_mavenpomdir}/JPP-%{name}.pom
 
-%files javadoc
+%files javadoc -f .mfiles-javadoc
 %doc LICENSE.txt NOTICE.txt
-%doc %{_javadocdir}/%{name}
 
 
 %changelog
+* Tue Jan 15 2013 Michal Srb <msrb at redhat.com> - 1.9-2
+- Build with xmvn
+
 * Thu Aug 23 2012 Mikolaj Izdebski <mizdebsk at redhat.com> - 1.9-1
 - Update to upstream version 1.9
 - Update to currennt packaging guidelines


More information about the scm-commits mailing list