[apache-rat] Update to maven 3
Orion Poplawski
orion at fedoraproject.org
Wed Dec 7 17:21:38 UTC 2011
commit 2257c020cc36384cc59bcb68880f7050e0c5c486
Author: Orion Poplawski <orion at cora.nwra.com>
Date: Wed Dec 7 10:21:34 2011 -0700
Update to maven 3
apache-rat-compat.patch | 15 +++++++++++++++
apache-rat.spec | 39 +++++++++++----------------------------
2 files changed, 26 insertions(+), 28 deletions(-)
---
diff --git a/apache-rat-compat.patch b/apache-rat-compat.patch
new file mode 100644
index 0000000..ffe23d8
--- /dev/null
+++ b/apache-rat-compat.patch
@@ -0,0 +1,15 @@
+diff -up apache-rat-0.8/apache-rat-plugin/pom.xml.compat apache-rat-0.8/apache-rat-plugin/pom.xml
+--- apache-rat-0.8/apache-rat-plugin/pom.xml.compat 2011-11-08 22:14:36.000000000 -0700
++++ apache-rat-0.8/apache-rat-plugin/pom.xml 2011-12-06 16:35:28.068167192 -0700
+@@ -122,6 +122,10 @@
+ <artifactId>maven-plugin-testing-harness</artifactId>
+ <version>1.1</version>
+ </dependency>
++ <dependency>
++ <groupId>org.apache.maven</groupId>
++ <artifactId>maven-compat</artifactId>
++ </dependency>
+ </dependencies>
+
+ <reporting>
+diff -up apache-rat-0.8/pom.xml.compat apache-rat-0.8/pom.xml
diff --git a/apache-rat.spec b/apache-rat.spec
index e2b26b1..0265733 100644
--- a/apache-rat.spec
+++ b/apache-rat.spec
@@ -14,12 +14,13 @@ URL: http://incubator.apache.org/rat/
#Source0: %{name}-%{version}-%{snapdate}.tar.bz2
Source0: http://www.apache.org/dist/incubator/rat/sources/apache-rat-incubating-%{version}-src.tar.bz2
Patch0: apache-rat-0.8-doxia-1.1.patch
+Patch1: apache-rat-compat.patch
Patch2: apache-rat-0.8-test.patch
BuildArch: noarch
BuildRequires: jpackage-utils
BuildRequires: java-devel
-BuildRequires: maven2
+BuildRequires: maven
BuildRequires: maven-antrun-plugin
BuildRequires: maven-compiler-plugin
BuildRequires: maven-dependency-plugin
@@ -43,9 +44,6 @@ BuildRequires: apache-commons-compress
Requires: jpackage-utils
Requires: java
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
-
%description
Release Audit Tool (RAT) is a tool to improve accuracy and efficiency when
checking releases. It is heuristic in nature: making guesses about possible
@@ -70,30 +68,24 @@ Requires: apache-commons-compress
Requires: apache-commons-lang
Requires: apache-commons-io
Requires: junit
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
%description core
The core functionality of RAT, shared by the Ant tasks, and the Maven plugin.
%package plugin
-Summary: Maven 2 plugin for %{name}
+Summary: Maven plugin for %{name}
Group: Development/Libraries
Requires: %{name}-core = %{version}-%{release}
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
%description plugin
-Maven 2 plugin for running RAT, the Release Audit Tool.
+Maven plugin for running RAT, the Release Audit Tool.
%package tasks
Summary: Ant tasks for %{name}
Group: Development/Libraries
Requires: %{name}-core = %{version}-%{release}
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
%description tasks
Ant tasks for running RAT.
@@ -111,17 +103,12 @@ This package contains the API documentation for %{name}.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .doxia-1.1
+%patch1 -p1 -b .compat
%patch2 -p1 -b .test
%build
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-mkdir -p $MAVEN_REPO_LOCAL
-
-mvn-jpp \
--Dmaven.repo.local=$MAVEN_REPO_LOCAL \
--Dmaven.test.failure.ignore=true \
-install javadoc:aggregate
+mvn-rpmbuild install javadoc:aggregate
%install
#Dirs
@@ -131,7 +118,7 @@ mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir}
#Parent pom
cp -p pom.xml \
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-%{name}.pom
-%add_to_maven_depmap org.apache.rat apache-rat-project %{version} JPP/%{name} %{name}
+%add_maven_depmap JPP.%{name}-%{name}.pom
#Components
for jarname in %{name}{-core,-plugin,-tasks}
@@ -140,7 +127,7 @@ do
cp -p $jarfile $RPM_BUILD_ROOT%{_javadir}/%{name}/${jarname}.jar
cp -p ${jarname}/pom.xml \
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-${jarname}.pom
- %add_to_maven_depmap org.apache.rat ${jarname} %{version} JPP/%{name} ${jarname}
+ %add_maven_depmap JPP.%{name}-${jarname}.pom %{name}/${jarname}.jar
done
#Ant taksks
@@ -153,13 +140,6 @@ cp -rp target/site/apidocs \
$RPM_BUILD_ROOT%{_javadocdir}/%{name}
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
-
-
%files
%defattr(-,root,root,-)
%doc DISCLAIMER.txt LICENSE NOTICE README.txt RELEASE_NOTES.txt
@@ -193,6 +173,9 @@ cp -rp target/site/apidocs \
%changelog
+* Wed Dec 7 2011 Orion Poplawski <orion at cora.nwra.com> 0.8-2
+- Update to maven 3
+
* Tue Dec 6 2011 Orion Poplawski <orion at cora.nwra.com> 0.8-1
- Update to 0.8 release
- Add BR maven-invoker-plugin
More information about the scm-commits
mailing list