commit 19234bd3ad9f78820627e4df7eaacbdfcc3d63ff
Author: Tomas Radej <tradej(a)redhat.com>
Date: Tue Dec 6 10:40:06 2011 +0100
Guidelines + build fixes
maven-plugin-build-helper-core.patch | 15 +++++++++
maven-plugin-build-helper.spec | 58 ++++++++++++----------------------
2 files changed, 35 insertions(+), 38 deletions(-)
---
diff --git a/maven-plugin-build-helper-core.patch b/maven-plugin-build-helper-core.patch
new file mode 100644
index 0000000..eb2e392
--- /dev/null
+++ b/maven-plugin-build-helper-core.patch
@@ -0,0 +1,15 @@
+diff --git a/pom.xml b/pom.xml
+index dd305c5..bb9f0f1 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -52,6 +52,10 @@
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
++ <artifactId>maven-compat</artifactId>
++ </dependency>
++ <dependency>
++ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
diff --git a/maven-plugin-build-helper.spec b/maven-plugin-build-helper.spec
index d6ea296..112fc57 100644
--- a/maven-plugin-build-helper.spec
+++ b/maven-plugin-build-helper.spec
@@ -1,6 +1,6 @@
Name: maven-plugin-build-helper
Version: 1.5
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Build Helper Maven Plugin
Group: Development/Libraries
@@ -12,11 +12,13 @@ URL:
http://mojo.codehaus.org/build-helper-maven-plugin/
# tar caf %{name}-%{version}.tar.xz %{name}-%{version}
Source0: %{name}-%{version}.tar.xz
Patch0: add-junit-dependency.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch1: %{name}-core.patch
BuildArch: noarch
+BuildRequires: jpackage-utils
BuildRequires: plexus-utils
+BuildRequires: maven
BuildRequires: maven-plugin-cobertura
BuildRequires: maven-plugin-plugin
BuildRequires: maven-resources-plugin
@@ -30,10 +32,9 @@ BuildRequires: maven-surefire-provider-junit4
BuildRequires: maven-doxia-sitetools
BuildRequires: mojo-parent
BuildRequires: junit4
+Requires: jpackage-utils
Requires: plexus-utils
Requires: mojo-parent
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
%description
This plugin contains various small independent goals to assist with
@@ -42,6 +43,7 @@ Maven build lifecycle.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
+Requires: jpackage-utils
%description javadoc
API documentation for %{name}.
@@ -49,62 +51,42 @@ API documentation for %{name}.
%prep
%setup -q
%patch0
+%patch1 -p1
%build
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-mvn-jpp \
- -e \
- -Dmaven2.jpp.mode=true \
- -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
- package javadoc:javadoc
+mvn-rpmbuild install javadoc:aggregate
%install
-rm -rf %{buildroot}
-
# jars
install -d -m 0755 %{buildroot}%{_javadir}
install -m 644 target/build-helper-maven-plugin-%{version}.jar \
- %{buildroot}%{_javadir}/%{name}-%{version}.jar
-ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
-
-(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; \
- do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
+ %{buildroot}%{_javadir}/%{name}.jar
-%add_to_maven_depmap org.codehaus.mojo build-helper-maven-plugin %{version} JPP
maven-plugin-build-helper
# poms
-install -d -m 755 %{buildroot}%{_datadir}/maven2/poms
+install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml \
- %{buildroot}%{_datadir}/maven2/poms/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*
+ %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
-%clean
-%{__rm} -rf %{buildroot}
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
+# javadoc
+install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
%files
-%defattr(-,root,root,-)
%{_javadir}/%{name}.jar
-%{_javadir}/%{name}-%{version}.jar
-%{_datadir}/maven2/poms/JPP-%{name}.pom
+%{_mavenpomdir}/JPP-%{name}.pom
%{_mavendepmapfragdir}/%{name}
%files javadoc
-%defattr(-,root,root,-)
-%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%changelog
+* Tue Dec 06 2011 Tomas Radej <tradej(a)redhat.com> - 1.5-4
+- Update to current guidelines
+- Fix build
+
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.5-3
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild