You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2010/02/11 15:03:51 UTC
svn commit: r908978 -
/maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSignAttachedMojo.java
Author: bentmann
Date: Thu Feb 11 14:03:49 2010
New Revision: 908978
URL: http://svn.apache.org/viewvc?rev=908978&view=rev
Log:
[MGPG-18] NPE in GpgSigner
Modified:
maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSignAttachedMojo.java
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?rev=908978&r1=908977&r2=908978&view=diff
==============================================================================
--- 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 Thu Feb 11 14:03:49 2010
@@ -150,6 +150,12 @@
File projectArtifact = project.getArtifact().getFile();
+ if ( projectArtifact == null )
+ {
+ throw new MojoFailureException( "The project artifact has not been assembled yet. "
+ + "Please do not invoke this goal before the lifecycle phase \"package\"." );
+ }
+
File projectArtifactSignature = signer.generateSignatureForArtifact( projectArtifact );
if ( projectArtifactSignature != null )