[xmltool] Build with maven 3.
Alexander Kurtakov
akurtakov at fedoraproject.org
Tue Nov 29 08:26:20 UTC 2011
commit b18932a97f69d17bd9bc631881197a39f2541b2a
Author: Alexander Kurtakov < <akurtako at redhat.com>
Date: Tue Nov 29 10:25:46 2011 +0200
Build with maven 3.
Adapt to current guidelines.
xmltool.spec | 74 +++++++++++----------------------------------------------
1 files changed, 15 insertions(+), 59 deletions(-)
---
diff --git a/xmltool.spec b/xmltool.spec
index 237bcc6..f9260c0 100644
--- a/xmltool.spec
+++ b/xmltool.spec
@@ -1,6 +1,6 @@
Name: xmltool
Version: 3.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Tool to manage XML documents through a Fluent Interface
Group: Development/Libraries
@@ -14,38 +14,16 @@ Source0: %{name}-%{version}.tar.xz
# remove dependency on maven-license-plugin and dependencies for tests
Patch0: 001-xmltool-fixbuild.patch
BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: java-devel
BuildRequires: jpackage-utils
-BuildRequires: maven2
-BuildRequires: maven2-plugin-assembly
-BuildRequires: maven2-plugin-deploy
-BuildRequires: maven2-plugin-jar
-BuildRequires: maven2-plugin-javadoc
-BuildRequires: maven2-plugin-source
-BuildRequires: maven2-plugin-clean
-BuildRequires: maven2-plugin-compiler
-BuildRequires: maven2-plugin-dependency
-BuildRequires: maven2-plugin-eclipse
-BuildRequires: maven2-plugin-idea
-BuildRequires: maven2-plugin-install
-BuildRequires: maven2-plugin-plugin
-BuildRequires: maven2-plugin-resources
-BuildRequires: maven2-plugin-repository
-BuildRequires: maven2-plugin-remote-resources
-BuildRequires: maven2-plugin-site
-BuildRequires: maven2-plugin-surefire
-BuildRequires: maven-release-plugin
-BuildRequires: maven-plugin-jxr
+BuildRequires: maven
+BuildRequires: maven-remote-resources-plugin
BuildRequires: apache-resource-bundles
Requires: java
Requires: jpackage-utils
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
-
%description
XMLTool is a very simple Java library to be able to do all sorts of common
operations with an XML document. Java developers often end up writing the same
@@ -57,7 +35,6 @@ Summary: Javadocs for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils
-BuildArch: noarch
%description javadoc
This package contains the API documentation for %{name}.
@@ -71,61 +48,40 @@ sed -i 's/\r//' LICENSE.txt
%build
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-mkdir -p $MAVEN_REPO_LOCAL
-
# tests require surefire/testng, not currently available
-mvn-jpp \
- -e \
- -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
+mvn-rpmbuild \
-Dmaven.test.skip=true \
install javadoc:javadoc
%install
-rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_javadir}
install -Dp -m 644 target/%{name}-%{version}.jar \
- $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
-(cd $RPM_BUILD_ROOT%{_javadir} && ln -sf %{name}-%{version}.jar %{name}.jar)
-
-mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-cp -rp target/site/apidocs/ \
- $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-(cd $RPM_BUILD_ROOT%{_javadocdir} && ln -sf %{name}-%{version} %{name})
-
-install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
-install -pm 644 pom.xml \
- $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
+ $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
-%add_to_maven_depmap com.mycila.xmltool %{name} %{version} JPP %{name}
+mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+cp -rp target/site/apidocs/ $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
+install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
-%clean
-rm -rf $RPM_BUILD_ROOT
-
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
%files
-%defattr(-,root,root,-)
%doc LICENSE.txt
-%{_datadir}/maven2/poms/*
+%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%{_javadir}/*
%files javadoc
-%defattr(-,root,root,-)
%{_javadocdir}/%{name}
-%{_javadocdir}/%{name}-%{version}
-
-
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
%changelog
+* Tue Nov 29 2011 Alexander Kurtakov <akurtako at redhat.com> 3.3-3
+- Build with maven 3.
+- Adapt to current guidelines.
+
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list