My fix remove only a NPE when packaging is pom. Without that, the plugin tried 
to sync artifact, but it doesn't exist when packaging is pom.

Emmanuel

Brett Porter a écrit :
I heard the same objection from Wendy. Can we roll this change back?

/me needs to track his objections more carefully, noting this has been released since.

- Brett

On 09/12/2006, at 11:25 AM, Brett Porter wrote:

Why not? I think signing the metadata is just as important.

- Brett

On 09/12/2006, at 2:53 AM, [EMAIL PROTECTED] wrote:

Author: evenisse
Date: Fri Dec  8 07:53:20 2006
New Revision: 484646

URL: http://svn.apache.org/viewvc?view=rev&rev=484646
Log:
Don't generate signature on artifact when the project is a pom

Modified:
    maven/plugins/trunk/maven-gpg-plugin/   (props changed)
maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSignAttachedMojo.java

Propchange: maven/plugins/trunk/maven-gpg-plugin/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Dec  8 07:53:20 2006
@@ -0,0 +1 @@
+target

Modified: maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSignAttachedMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSignAttachedMojo.java?view=diff&rev=484646&r1=484645&r2=484646 ============================================================================== --- maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSignAttachedMojo.java (original) +++ maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSignAttachedMojo.java Fri Dec 8 07:53:20 2006
@@ -97,15 +97,18 @@

         List signingBundles = new ArrayList();

- // ----------------------------------------------------------------------------
-        // Project artifact
- // ----------------------------------------------------------------------------
+        if ( !"pom".equals( project.getPackaging() ) )
+        {
+ // ----------------------------------------------------------------------------
+            // Project artifact
+ // ----------------------------------------------------------------------------

- File projectArtifact = getProjectFile( project.getBuild().getDirectory(), project.getBuild().getFinalName() ); + File projectArtifact = getProjectFile( project.getBuild().getDirectory(), project.getBuild().getFinalName() );

- File projectArtifactSignature = generateSignatureForArtifact( projectArtifact ); + File projectArtifactSignature = generateSignatureForArtifact( projectArtifact );

- signingBundles.add( new SigningBundle( project.getArtifact().getType(), projectArtifactSignature ) ); + signingBundles.add( new SigningBundle( project.getArtifact().getType(), projectArtifactSignature ) );
+        }

// ----------------------------------------------------------------------------
         // POM


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to