geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r437916 - /geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/GpgSignAttachedMojo.java
Date Tue, 29 Aug 2006 02:17:16 GMT
Author: jdillon
Date: Mon Aug 28 19:17:15 2006
New Revision: 437916

URL: http://svn.apache.org/viewvc?rev=437916&view=rev
Log:
Skip artifacts that have not files

Modified:
    geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/GpgSignAttachedMojo.java

Modified: geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/GpgSignAttachedMojo.java
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/GpgSignAttachedMojo.java?rev=437916&r1=437915&r2=437916&view=diff
==============================================================================
--- geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/GpgSignAttachedMojo.java
(original)
+++ geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/GpgSignAttachedMojo.java
Mon Aug 28 19:17:15 2006
@@ -101,7 +101,10 @@
         while (iter.hasNext()) {
             Artifact artifact = (Artifact)iter.next();
             File signature = sign(artifact);
-            projectHelper.attachArtifact(project, artifact.getType() + ".asc", null, signature);
+
+            if (signature != null) {
+                projectHelper.attachArtifact(project, artifact.getType() + ".asc", null,
signature);
+            }
         }
     }
 
@@ -109,7 +112,13 @@
         assert artifact != null;
 
         File file = artifact.getFile();
-        log.info("Signing artifact file: " + file);
+        if (file == null) {
+            log.info("No file to sign for artifact: " + artifact);
+            return null;
+        }
+        else {
+            log.info("Signing artifact file: " + file);
+        }
 
         File signature = new File(file.getCanonicalPath() + ".asc");
         log.debug("Signature file: " + signature);



Mime
View raw message