[plexus-mail-sender] Fix build and install proper pom files

Stanislav Ochotnicky sochotni at fedoraproject.org
Fri Mar 2 17:56:49 UTC 2012


commit 9d486aa87aa0d816242a4cda7d132be88679ff3c
Author: Stanislav Ochotnicky <sochotnicky at redhat.com>
Date:   Fri Mar 2 18:56:11 2012 +0100

    Fix build and install proper pom files

 plexus-mail-sender.spec |   39 ++++++++++++++++++++++++++++-----------
 1 files changed, 28 insertions(+), 11 deletions(-)
---
diff --git a/plexus-mail-sender.spec b/plexus-mail-sender.spec
index 9f5dd5c..3ed6545 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.20%{?dist}.1
+Release:        0.a2.21%{?dist}
 Epoch:          0
 Summary:        Plexus Mail Sender
 License:        MIT and ASL 1.1
@@ -65,9 +65,6 @@ BuildRequires:  saxon
 BuildRequires:  saxon-scripts
 BuildRequires:  java-devel >= 1:1.6.0
 
-# just one-off remove during next rebuild!
-BUildRequires:  plexus-mail-sender
-
 Requires:       java
 Requires:       jpackage-utils
 
@@ -95,9 +92,24 @@ Javadoc for %{name}.
 %setup -q -n %{name}-%{version}-a2
 %patch0 -p3
 
+mv release-pom.xml pom.xml
+
+pushd plexus-mail-senders
+mv release-pom.xml pom.xml
+for mod in javamail simple test;do
+    pushd %{name}-$mod
+    mv release-pom.xml pom.xml
+    popd
+done
+popd
+
+mv %{name}-api/release-pom.xml %{name}-api/pom.xml
+find . -iname 'pom.xml' -exec sed -i \
+       's:<groupId>plexus</groupId>:<groupId>org.codehaus.plexus</groupId>:g' \{\} \;
+
+
 %build
 mvn-rpmbuild \
-        -Dmaven.local.debug=true \
         -Dmaven.local.depmap.file="%{SOURCE2}" \
         -Dmaven.test.skip=true \
         install javadoc:aggregate
@@ -109,20 +121,22 @@ install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
 pushd plexus-mail-senders
 for mod in javamail simple test;do
     pushd %{name}-$mod
-    install -pm 644 target/%{name}-$mod-%{namedversion}.jar \
+    install -pm 644 target/%{name}-$mod-%{namedversion}*.jar \
             $RPM_BUILD_ROOT%{_javadir}/plexus/mail-sender-$mod.jar
-    install -pm 644 release-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-sendser-$mod"
+    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 \
+  %{name}-api/target/%{name}-api-%{namedversion}*.jar \
   $RPM_BUILD_ROOT%{_javadir}/plexus/mail-sender-api.jar
-install -pm 644 %{name}-api/release-pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.plexus-mail-sender-api.pom
-%add_maven_depmap JPP.%{name}-api.pom 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"
 
+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"
 
 # javadoc
 install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
@@ -138,6 +152,9 @@ cp -pr target/site/apidocs/* \
 %{_javadocdir}/%{name}
 
 %changelog
+* Fri Mar  2 2012 Stanislav Ochotnicky <sochotnicky at redhat.com> 0:1.0-0.a2.21
+- Fix build and install proper pom files
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0:1.0-0.a2.20.1
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list