[ws-commons-util] Build ws-commons-util with Maven 3

Andrew Overholt overholt at fedoraproject.org
Thu Jun 16 14:33:48 UTC 2011


commit d5abe534e59423dbd89c4e2531aed4e57ce5676f
Author: Andrew Overholt <overholt at redhat.com>
Date:   Thu Jun 16 10:33:26 2011 -0400

    Build ws-commons-util with Maven 3

 ws-commons-util.spec |   42 ++++++++----------------------------------
 1 files changed, 8 insertions(+), 34 deletions(-)
---
diff --git a/ws-commons-util.spec b/ws-commons-util.spec
index 14a505d..f1516c8 100644
--- a/ws-commons-util.spec
+++ b/ws-commons-util.spec
@@ -1,28 +1,17 @@
-%global         with_maven 1
-
 Name:           ws-commons-util
 Version:        1.0.1
-Release:        18%{?dist}
+Release:        19%{?dist}
 Summary:        Common utilities from the Apache Web Services Project
 
 Group:          System Environment/Libraries
 License:        ASL 2.0
 URL:            http://apache.osuosl.org/ws/commons/util/
 Source0:        http://apache.osuosl.org/ws/commons/util/sources/ws-commons-util-1.0.1-src.tar.gz
-%if ! %{with_maven}
-# Generated with mvn ant:ant and MANIFEST.MF added to jar task
-Source1:        build.xml
-Source2:        maven-build.xml
-Source3:        MANIFEST.MF
-%else
 Patch0:         %{name}-addosgimanifest.patch
-%endif
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 
 BuildRequires:  jpackage-utils >= 1.5
-%if %{with_maven}
-BuildRequires:  maven2
+BuildRequires:  maven
 BuildRequires:  maven-jar-plugin
 BuildRequires:  maven-compiler-plugin
 BuildRequires:  maven-install-plugin
@@ -35,9 +24,6 @@ BuildRequires:  maven-surefire-provider-junit
 BuildRequires:  maven-eclipse-plugin
 BuildRequires:  maven-doxia
 BuildRequires:  maven-doxia-sitetools
-%else
-BuildRequires:  ant
-%endif
 BuildRequires:  junit
 BuildRequires:  java-javadoc
 
@@ -58,25 +44,10 @@ Requires:       jpackage-utils
 
 %prep
 %setup -q -n %{name}-%{version}
-%if ! %{with_maven}
-cp -p %{SOURCE1} .
-cp -p %{SOURCE2} .
-cp -p %{SOURCE3} .
-%else
 %patch0
-%endif
 
 %build
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-mkdir -p $MAVEN_REPO_LOCAL
-%if %{with_maven}
-mvn-jpp \
-  -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-  install javadoc:javadoc
-%else
-ant -Dmaven.mode.offline=true -Dmaven.repo.local=`pwd`/.m2 \
-  -Djunit.skipped=true -Dmaven.test.skip=true javadoc package
-%endif
+mvn-rpmbuild install javadoc:javadoc
 
 %install
 install -dm 755 $RPM_BUILD_ROOT%{_javadir}
@@ -106,18 +77,21 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
 
 
 %files
-%defattr(-,root,root,-)
 %doc LICENSE.txt
 %{_javadir}/*.jar
 %{_mavenpomdir}/JPP-%{name}.pom
 %{_mavendepmapfragdir}/%{name}
 
 %files javadoc
-%defattr(-,root,root,-)
 %doc LICENSE.txt
 %doc %{_javadocdir}/%{name}
 
 %changelog
+* Thu Jun 16 2011 Andrew Overholt <overholt at redhat.com> 1.0.1-19
+- Build with Maven 3.
+- Clean up unnecessary lines.
+- Remove building with ant.
+
 * Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.1-18
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list