[java-sig-commits] [maven-install-plugin/f16] Fixes for pure maven 3 build without maven 2 in buildroot
Stanislav Ochotnicky
sochotni at fedoraproject.org
Mon Dec 5 16:58:35 UTC 2011
commit 60ab6b1a32616dcfa861d249cb46fcd9097ccd8b
Author: Stanislav Ochotnicky <sochotnicky at redhat.com>
Date: Mon Dec 5 17:42:29 2011 +0100
Fixes for pure maven 3 build without maven 2 in buildroot
- Guideline fixes
0001-Fix-up-dependencies-for-maven-3.patch | 39 ++++++++++++++++++++++++++++
maven-install-plugin.spec | 33 ++++++++++-------------
pom.patch | 13 ---------
3 files changed, 54 insertions(+), 31 deletions(-)
---
diff --git a/0001-Fix-up-dependencies-for-maven-3.patch b/0001-Fix-up-dependencies-for-maven-3.patch
new file mode 100644
index 0000000..9078a3e
--- /dev/null
+++ b/0001-Fix-up-dependencies-for-maven-3.patch
@@ -0,0 +1,39 @@
+From 8bb6f84a0b48ca569cf046e48500e2c04f1d9223 Mon Sep 17 00:00:00 2001
+From: Stanislav Ochotnicky <sochotnicky at redhat.com>
+Date: Mon, 5 Dec 2011 17:36:35 +0100
+Subject: [PATCH] Fix up dependencies for maven 3
+
+---
+ pom.xml | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+diff --git a/pom.xml b/pom.xml
+index 36754e2..8d6d1b5 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -57,6 +57,11 @@ under the License.
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
++ <artifactId>maven-compat</artifactId>
++ <version>${mavenVersion}</version>
++ </dependency>
++ <dependency>
++ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+@@ -76,6 +81,10 @@ under the License.
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
++ <groupId>org.apache.maven.wagon</groupId>
++ <artifactId>wagon-provider-api</artifactId>
++ </dependency>
++ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <version>${mavenVersion}</version>
+--
+1.7.7.3
+
diff --git a/maven-install-plugin.spec b/maven-install-plugin.spec
index 9ca679e..8923e90 100644
--- a/maven-install-plugin.spec
+++ b/maven-install-plugin.spec
@@ -1,15 +1,15 @@
Name: maven-install-plugin
Version: 2.3.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Maven Install Plugin
Group: Development/Libraries
License: ASL 2.0
URL: http://maven.apache.org/plugins/maven-install-plugin
Source0: http://repo2.maven.org/maven2/org/apache/maven/plugins/%{name}/%{version}/%{name}-%{version}-source-release.zip
-Patch0: pom.patch
+Patch0: 0001-Fix-up-dependencies-for-maven-3.patch
-BuildArch: noarch
+BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: maven
@@ -34,8 +34,6 @@ Requires: jpackage-utils
Requires: java
Requires: maven-archiver
Requires: plexus-digest
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
Provides: maven2-plugin-install = %{version}-%{release}
Obsoletes: maven2-plugin-install <= 0:2.0.8
@@ -53,9 +51,9 @@ API documentation for %{name}.
%prep
-%setup -q
-#Add dependency of wagon-provider-api
-%patch0
+%setup -q
+#Add dependency to make this work properly with maven 3
+%patch0 -p1
%build
mvn-rpmbuild \
@@ -67,34 +65,33 @@ mvn-rpmbuild \
install -d -m 0755 %{buildroot}%{_javadir}
install -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
-%add_to_maven_depmap org.apache.maven.plugins maven-install-plugin %{version} JPP maven-install-plugin
# poms
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml \
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
+
# javadoc
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
-
%files
%doc LICENSE NOTICE
-%{_javadir}/*
-%{_mavenpomdir}/*
-%{_mavendepmapfragdir}/*
+%{_javadir}/%{name}.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
%files javadoc
%doc LICENSE
%{_javadocdir}/%{name}
%changelog
+* Mon Dec 5 2011 Stanislav Ochotnicky <sochotnicky at redhat.com> - 2.3.1-4
+- Fixes for pure maven 3 build without maven 2 in buildroot
+- Guideline fixes
+
* Fri Jun 3 2011 Alexander Kurtakov <akurtako at redhat.com> 2.3.1-3
- Build with maven v3.
- Guidelines fixes.
More information about the java-sig-commits
mailing list