[plexus-mail-sender] Build with xmvn

Michal Srb msrb at fedoraproject.org
Fri Jan 25 15:51:12 UTC 2013


commit a58466bfb04bf41d322d9abffce806c98e3f966d
Author: Michal Srb <msrb at redhat.com>
Date:   Fri Jan 25 13:23:15 2013 +0100

    Build with xmvn
    
    - Fixed pom_ macro

 plexus-mail-sender.spec |   53 +++++++++++-----------------------------------
 1 files changed, 13 insertions(+), 40 deletions(-)
---
diff --git a/plexus-mail-sender.spec b/plexus-mail-sender.spec
index c215017..93a9946 100644
--- a/plexus-mail-sender.spec
+++ b/plexus-mail-sender.spec
@@ -32,7 +32,7 @@
 
 Name:           plexus-mail-sender
 Version:        1.0
-Release:        0.a2.22%{?dist}
+Release:        0.a2.23%{?dist}
 Epoch:          0
 Summary:        Plexus Mail Sender
 License:        MIT and ASL 1.1
@@ -49,7 +49,7 @@ Source0:        plexus-mail-sender-%{version}-a2-src.tar.gz
 Patch0:         %{name}-clarifylicense.patch
 
 BuildRequires:  jpackage-utils >= 0:1.6
-BuildRequires:  maven
+BuildRequires:  xmvn
 BuildRequires:  maven-compiler-plugin
 BuildRequires:  maven-install-plugin
 BuildRequires:  maven-jar-plugin
@@ -62,8 +62,6 @@ BuildRequires:  saxon
 BuildRequires:  saxon-scripts
 BuildRequires:  java-devel >= 1:1.6.0
 
-Requires:       java
-Requires:       jpackage-utils
 
 BuildArch:      noarch
 
@@ -80,11 +78,11 @@ Plexus component provides SMTP transport.
 %package javadoc
 Summary:        Javadoc for %{name}
 Group:          Documentation
-Requires:       jpackage-utils
 
 %description javadoc
 Javadoc for %{name}.
 
+
 %prep
 %setup -q -n %{name}-%{version}-a2
 %patch0 -p3
@@ -93,7 +91,7 @@ mv release-pom.xml pom.xml
 
 pushd plexus-mail-senders
 mv release-pom.xml pom.xml
-%pom_xpath_remove "modules/module [text()='plexus-mail-sender-test']"
+%pom_disable_module plexus-mail-sender-test
 for mod in javamail simple test;do
     pushd %{name}-$mod
     mv release-pom.xml pom.xml
@@ -107,47 +105,22 @@ find . -iname 'pom.xml' -exec sed -i \
 
 
 %build
-mvn-rpmbuild -Dmaven.test.skip=true \
-            package javadoc:aggregate
+%mvn_package ":*senders" __noinstall
+%mvn_build -f
 
 %install
-# jars
-install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/plexus
-install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
-pushd plexus-mail-senders
-for mod in javamail simple;do
-    pushd %{name}-$mod
-    install -pm 644 target/%{name}-$mod-%{namedversion}*.jar \
-            $RPM_BUILD_ROOT%{_javadir}/plexus/mail-sender-$mod.jar
-    install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.plexus-mail-sender-$mod.pom
-    %add_maven_depmap JPP.%{name}-$mod.pom plexus/mail-sender-$mod.jar -a "org.codehaus.plexus:plexus-mail-sender-$mod"
-    popd
-done
-popd
-
-install -pm 644 \
-  %{name}-api/target/%{name}-api-%{namedversion}*.jar \
-  $RPM_BUILD_ROOT%{_javadir}/plexus/mail-sender-api.jar
-install -pm 644 %{name}-api/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.plexus-mail-sender-api.pom
-%add_maven_depmap JPP.%{name}-api.pom plexus/mail-sender-api.jar -a "org.codehaus.plexus:plexus-mail-sender-api"
+%mvn_install
 
-install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.plexus-mail-sender.pom
-%add_maven_depmap JPP.%{name}.pom -a "org.codehaus.plexus:plexus-mail-sender"
+%files -f .mfiles
 
-# javadoc
-install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-cp -pr target/site/apidocs/* \
-  $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+%files javadoc -f .mfiles-javadoc
 
-%files
-%{_mavendepmapfragdir}/%{name}
-%{_mavenpomdir}/*pom
-%{_javadir}/plexus/*jar
-
-%files javadoc
-%{_javadocdir}/%{name}
 
 %changelog
+* Thu Jan 24 2013 Michal Srb <msrb at redhat.com> - 0:1.0-0.a2.23
+- Build with xmvn
+- Fixed pom_ macro
+
 * Thu Oct 11 2012 Stanislav Ochotnicky <sochotnicky at redhat.com> - 0:1.0-0.a2.22
 - Do not build test submodule to simplify dependencies
 


More information about the scm-commits mailing list