[java-sig-commits] [maven-doap-plugin] Build with maven 3.

Alexander Kurtakov akurtakov at fedoraproject.org
Fri Jun 17 20:25:28 UTC 2011


commit 2dc5e4f53609948246f2b7cff69e726c6f1fb46b
Author: Alexander Kurtakov <akurtakov at gmail.com>
Date:   Fri Jun 17 23:25:09 2011 +0300

    Build with maven 3.

 maven-doap-plugin.spec |   41 ++++++++++++-----------------------------
 1 files changed, 12 insertions(+), 29 deletions(-)
---
diff --git a/maven-doap-plugin.spec b/maven-doap-plugin.spec
index dec4f26..f89a3ad 100644
--- a/maven-doap-plugin.spec
+++ b/maven-doap-plugin.spec
@@ -1,6 +1,6 @@
 Name:           maven-doap-plugin
 Version:        1.0
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Plugins which generate a DOAP file from information in a POM
 
 Group:          Development/Libraries
@@ -11,26 +11,24 @@ URL:            http://maven.apache.org/plugins/maven-doap-plugin/
 Source0:        %{name}-%{version}.tar.bz2
 Patch0:        %{name}-pom.patch
 
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
 BuildArch: noarch
 
 BuildRequires: java-devel >= 1:1.6.0
 BuildRequires: plexus-utils
-BuildRequires: ant-nodeps
+BuildRequires: ant
 BuildRequires: maven2
 BuildRequires: maven-install-plugin
 BuildRequires: maven-compiler-plugin
 BuildRequires: maven-plugin-plugin
 BuildRequires: maven-resources-plugin
-BuildRequires: maven-surefire-maven-plugin
+BuildRequires: maven-surefire-plugin
 BuildRequires: maven-surefire-provider-junit
 BuildRequires: maven-plugin-testing-harness
 BuildRequires: maven-jar-plugin
 BuildRequires: maven-javadoc-plugin
 BuildRequires: jpackage-utils
-Requires: ant-nodeps
-Requires: maven2
+Requires: ant
+Requires: maven
 Requires: jpackage-utils
 Requires: java
 Requires(post): jpackage-utils
@@ -60,24 +58,14 @@ API documentation for %{name}.
 %patch0 -b .sav
 
 %build
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-
-mvn-jpp \
-        -e \
-        -Dmaven2.jpp.mode=true \
-        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
+mvn-rpmbuild \
         -Dmaven.test.skip=true \
         install javadoc:javadoc
 
 %install
-rm -rf %{buildroot}
-
 # jars
 install -d -m 0755 %{buildroot}%{_javadir}
-install -m 644 target/%{name}-%{version}.jar   %{buildroot}%{_javadir}/%{name}-%{version}.jar
-
-(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; \
-    do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
+install -m 644 target/%{name}-%{version}.jar   %{buildroot}%{_javadir}/%{name}.jar
 
 %add_to_maven_depmap org.apache.maven.plugins %{name} %{version} JPP %{name}
 
@@ -87,10 +75,8 @@ install -pm 644 pom.xml \
     %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
 
 # javadoc
-install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{version}
-cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}-%{version}/
-ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
-rm -rf target/site/api*
+install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
 
 %post
 %update_maven_depmap
@@ -98,21 +84,18 @@ rm -rf target/site/api*
 %postun
 %update_maven_depmap
 
-%clean
-rm -rf %{buildroot}
-
 %files
-%defattr(-,root,root,-)
 %{_javadir}/*
 %{_mavenpomdir}/*
 %{_mavendepmapfragdir}/*
 
 %files javadoc
-%defattr(-,root,root,-)
-%{_javadocdir}/%{name}-%{version}
 %{_javadocdir}/%{name}
 
 %changelog
+* Fri Jun 17 2011 Alexander Kurtakov <akurtako at redhat.com> 1.0-5
+- Build with maven 3.
+
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the java-sig-commits mailing list