[java-sig-commits] [maven-idea-plugin] Fix working in pure maven 3 environment.

Alexander Kurtakov akurtakov at fedoraproject.org
Mon Dec 5 21:19:55 UTC 2011


commit c95239f2653e4ac38019d727f8c058733e7f94b0
Author: Alexander Kurtakov < <akurtako at redhat.com>
Date:   Mon Dec 5 23:19:40 2011 +0200

    Fix working in pure maven 3 environment.

 add_compat.patch       |   14 ++++++++++++++
 maven-idea-plugin.spec |   17 +++++++----------
 2 files changed, 21 insertions(+), 10 deletions(-)
---
diff --git a/add_compat.patch b/add_compat.patch
new file mode 100644
index 0000000..7db769e
--- /dev/null
+++ b/add_compat.patch
@@ -0,0 +1,14 @@
+--- pom.xml.sav	2008-08-04 00:10:55.000000000 +0300
++++ pom.xml	2011-12-05 23:13:21.718239773 +0200
+@@ -86,6 +86,11 @@
+       <artifactId>maven-model</artifactId>
+       <version>2.0.1</version>
+     </dependency>
++     <dependency>
++      <groupId>org.apache.maven</groupId>
++      <artifactId>maven-compat</artifactId>
++      <version>3.0.2</version>
++    </dependency>
+     <dependency>
+       <groupId>org.codehaus.plexus</groupId>
+       <artifactId>plexus-container-default</artifactId>
diff --git a/maven-idea-plugin.spec b/maven-idea-plugin.spec
index 09978f7..df0a9a4 100644
--- a/maven-idea-plugin.spec
+++ b/maven-idea-plugin.spec
@@ -1,6 +1,6 @@
 Name:           maven-idea-plugin
 Version:        2.2
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Maven IDEA Plugin
 
 Group:          Development/Libraries
@@ -9,6 +9,7 @@ URL:            http://maven.apache.org/plugins/%{name}
 # svn export http://svn.apache.org/repos/asf/maven/plugins/tags/maven-idea-plugin-2.2
 # tar caf maven-idea-plugin-2.2.tar.xz maven-idea-plugin-2.2
 Source0:        %{name}-%{version}.tar.xz
+Patch0:         add_compat.patch
 
 BuildArch: noarch
 
@@ -32,8 +33,6 @@ Requires: ant
 Requires: maven
 Requires: jpackage-utils
 Requires: java
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
 
 Obsoletes: maven2-plugin-idea <= 0:2.0.8
 Provides: maven2-plugin-idea = 1:%{version}-%{release}
@@ -54,6 +53,7 @@ Requires:       jpackage-utils
 
 %prep
 %setup -q 
+%patch0
 
 %build
 # we skip test because even with binary mvn release these fail for
@@ -69,18 +69,12 @@ install -Dpm 644 target/%{name}-%{version}.jar   %{buildroot}%{_javadir}/%{name}
 # poms
 install -Dpm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
 
-%add_to_maven_depmap org.apache.maven.plugins %{name} %{version} JPP %{name}
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
 
 # javadoc
 install -dm 755 %{buildroot}%{_javadocdir}/%{name}
 cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
 
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
-
 %files
 %{_javadir}/*
 %{_mavenpomdir}/*
@@ -90,6 +84,9 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
 %{_javadocdir}/%{name}
 
 %changelog
+* Mon Dec 5 2011 Alexander Kurtakov <akurtako at redhat.com> 2.2-6
+- Fix working in pure maven 3 environment.
+
 * Fri Jun 17 2011 Alexander Kurtakov <akurtako at redhat.com> 2.2-5
 - Build with maven 3.x
 


More information about the java-sig-commits mailing list