[java-sig-commits] [maven-gpg-plugin] Update to latest upstream version

Stanislav Ochotnicky sochotni at fedoraproject.org
Wed Jul 20 13:37:45 UTC 2011


commit 3503cf1ec124110428bc4a55059f3827f13267f3
Author: Stanislav Ochotnicky <sochotnicky at redhat.com>
Date:   Wed Jul 20 15:25:17 2011 +0200

    Update to latest upstream version

 .gitignore                         |    1 +
 0001-Add-support-for-maven-3.patch |   63 ++++++++++++++++++++++++++++++++++++
 maven-gpg-plugin.spec              |   36 ++++++++------------
 sources                            |    2 +-
 4 files changed, 79 insertions(+), 23 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 92b3728..b9a4d0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 maven-gpg-plugin-1.1.tar.xz
 maven-gpg-plugin-1.2-source-release.zip
+/maven-gpg-plugin-1.3-source-release.zip
diff --git a/0001-Add-support-for-maven-3.patch b/0001-Add-support-for-maven-3.patch
new file mode 100644
index 0000000..823430e
--- /dev/null
+++ b/0001-Add-support-for-maven-3.patch
@@ -0,0 +1,63 @@
+From 900d254a483b8d751456afc444f9e67d85d03c0c Mon Sep 17 00:00:00 2001
+From: Stanislav Ochotnicky <sochotnicky at redhat.com>
+Date: Wed, 20 Jul 2011 14:57:00 +0200
+Subject: [PATCH] Add support for maven 3
+
+---
+ pom.xml                                            |    5 +++++
+ .../maven/plugin/gpg/AscArtifactMetadata.java      |    9 +++++++++
+ .../maven/plugin/gpg/AttachedSignedArtifact.java   |    2 +-
+ 3 files changed, 15 insertions(+), 1 deletions(-)
+
+diff --git a/pom.xml b/pom.xml
+index d68cf39..d2f97b9 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>
+diff --git a/src/main/java/org/apache/maven/plugin/gpg/AscArtifactMetadata.java b/src/main/java/org/apache/maven/plugin/gpg/AscArtifactMetadata.java
+index b348c87..98bb5d8 100644
+--- a/src/main/java/org/apache/maven/plugin/gpg/AscArtifactMetadata.java
++++ b/src/main/java/org/apache/maven/plugin/gpg/AscArtifactMetadata.java
+@@ -85,6 +85,15 @@ public class AscArtifactMetadata
+     {
+         return getFilename();
+     }
++    public void merge( org.apache.maven.repository.legacy.metadata.ArtifactMetadata metadata )
++    {
++        AscArtifactMetadata m = (AscArtifactMetadata) metadata;
++        if ( !m.file.equals( file ) )
++        {
++            throw new IllegalStateException( "Cannot add two different pieces of metadata for: " + getKey() );
++        }
++    }
++ 
+ 
+     public void merge( ArtifactMetadata metadata )
+     {
+diff --git a/src/main/java/org/apache/maven/plugin/gpg/AttachedSignedArtifact.java b/src/main/java/org/apache/maven/plugin/gpg/AttachedSignedArtifact.java
+index a4baf8e..cc8e508 100644
+--- a/src/main/java/org/apache/maven/plugin/gpg/AttachedSignedArtifact.java
++++ b/src/main/java/org/apache/maven/plugin/gpg/AttachedSignedArtifact.java
+@@ -192,7 +192,7 @@ public class AttachedSignedArtifact
+         return delegate.equals( o );
+     }
+ 
+-    public int compareTo( Object o )
++    public int compareTo( Artifact o )
+     {
+         return delegate.compareTo( o );
+     }
+-- 
+1.7.6
+
diff --git a/maven-gpg-plugin.spec b/maven-gpg-plugin.spec
index 16f7c6a..5c26e69 100644
--- a/maven-gpg-plugin.spec
+++ b/maven-gpg-plugin.spec
@@ -1,5 +1,5 @@
 Name:           maven-gpg-plugin
-Version:        1.2
+Version:        1.3
 Release:        1%{?dist}
 Summary:        Maven GPG Plugin
 
@@ -7,6 +7,7 @@ Group:          Development/Libraries
 License:        ASL 2.0
 URL:            http://maven.apache.org/plugins/maven-gpg-plugin/
 Source0:        http://repo2.maven.org/maven2/org/apache/maven/plugins/%{name}/%{version}/%{name}-%{version}-source-release.zip
+Patch0:         0001-Add-support-for-maven-3.patch
 
 BuildArch: noarch
 
@@ -26,8 +27,6 @@ Requires: maven
 Requires: jpackage-utils
 Requires: java
 Requires: gnupg2
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
 
 Obsoletes: maven2-plugin-gpg <= 0:2.0.8
 Provides: maven2-plugin-gpg = 1:%{version}-%{release}
@@ -46,7 +45,9 @@ Requires: jpackage-utils
 API documentation for %{name}.
 
 %prep
-%setup -q 
+%setup -q
+
+%patch0 -p1
 
 %build
 mvn-rpmbuild install javadoc:javadoc
@@ -55,35 +56,26 @@ mvn-rpmbuild install javadoc:javadoc
 # jars
 install -Dpm 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
 
-%add_to_maven_depmap org.apache.maven.plugins %{name} %{version} JPP %{name}
-
 # poms
 install -Dpm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
 
-# javadoc
-install -dm 755 %{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*
-
-%post
-%update_maven_depmap
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
 
-%postun
-%update_maven_depmap
+# javadoc
+install -dm 755 %{buildroot}%{_javadocdir}/%{name}
 
 %files
-%defattr(-,root,root,-)
-%{_javadir}/*
-%{_mavenpomdir}/*
-%{_mavendepmapfragdir}/*
+%{_javadir}/%{name}.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
 
 %files javadoc
-%defattr(-,root,root,-)
-%{_javadocdir}/%{name}-%{version}
 %{_javadocdir}/%{name}
 
 %changelog
+* Mon Jun 13 2011 Stanislav Ochotnicky <sochotnicky at redhat.com> - 1.3-1
+- Update to latest upstream version
+
 * Fri Mar 25 2011 Alexander Kurtakov <akurtako at redhat.com> 1.2-1
 - Update to new upstream release.
 - Adapt to current guidelines.
diff --git a/sources b/sources
index c19392f..96ba4fc 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-fb3d2b7c31e11eeb0ac02c30acd41480  maven-gpg-plugin-1.2-source-release.zip
+676528352ea884c302ac9225577ca9fe  maven-gpg-plugin-1.3-source-release.zip


More information about the java-sig-commits mailing list