Update to maven 3

- Remove rpm bug workaround
This commit is contained in:
Mikolaj Izdebski 2012-04-05 17:53:35 +02:00 committed by Alexander Kurtakov
parent 7f3020a044
commit 199a5e273b

View File

@ -34,7 +34,7 @@
Name: %{parent}-%{subname}
Version: 2.4
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Plexus Classworlds Classloader Framework
License: ASL 2.0 and Plexus
Group: Development/Libraries
@ -48,7 +48,7 @@ BuildArch: noarch
BuildRequires: jpackage-utils
BuildRequires: apache-commons-logging
BuildRequires: xml-commons-jaxp-1.3-apis
BuildRequires: maven2
BuildRequires: maven
BuildRequires: maven-compiler-plugin
BuildRequires: maven-install-plugin
BuildRequires: maven-jar-plugin
@ -64,9 +64,6 @@ BuildRequires: maven-surefire-maven-plugin
BuildRequires: maven-surefire-provider-junit
BuildRequires: plexus-utils
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
%description
Classworlds is a framework for container developers
who require complex manipulation of Java's ClassLoaders.
@ -95,52 +92,36 @@ done
sed -i 's:<groupId>ant</groupId>:<groupId>org.apache.ant</groupId>:' pom.xml
%build
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
mvn-jpp -e \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
install javadoc:javadoc
mvn-rpmbuild -e install javadoc:javadoc
%install
# jars
install -Dpm 644 target/%{name}-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/plexus/%{subname}.jar
%add_to_maven_depmap org.codehaus.plexus %{name} %{version} JPP/%{parent} %{subname}
# pom
install -Dpm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{parent}-%{subname}.pom
%add_maven_depmap JPP.%{parent}-%{subname}.pom plexus/%{subname}.jar
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%pre javadoc
# workaround for rpm bug, can be removed in F-17
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files
%defattr(-,root,root,-)
%{_javadir}/%{parent}/*
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%doc LICENSE.txt
%files javadoc
%defattr(-,root,root,-)
%doc LICENSE.txt
%doc %{_javadocdir}/%{name}
%changelog
* Thu Apr 5 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.4-4
- Update to maven 3
- Remove rpm bug workaround
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild