maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r1512657 - /maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSigner.java
Date Sat, 10 Aug 2013 11:56:10 GMT
Author: dennisl
Date: Sat Aug 10 11:56:10 2013
New Revision: 1512657

URL: http://svn.apache.org/r1512657
Log:
Add documentation.

Modified:
    maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSigner.java

Modified: maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSigner.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSigner.java?rev=1512657&r1=1512656&r2=1512657&view=diff
==============================================================================
--- maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSigner.java
(original)
+++ maven/plugins/trunk/maven-gpg-plugin/src/main/java/org/apache/maven/plugin/gpg/GpgSigner.java
Sat Aug 10 11:56:10 2013
@@ -124,9 +124,20 @@ public class GpgSigner
         publicKeyring = path;
     }
 
+    /**
+     * Create a detached signature file for the provided file.
+     *
+     * @param file The file to sign
+     * @return A reference to the generated signature file
+     * @throws MojoExecutionException
+     */
     public File generateSignatureForArtifact( File file )
         throws MojoExecutionException
     {
+        // ----------------------------------------------------------------------------
+        // Set up the file and directory for the signature file
+        // ----------------------------------------------------------------------------
+
         File signature = new File( file + SIGNATURE_EXTENSION );
 
         boolean isInBuildDir = false;
@@ -167,6 +178,10 @@ public class GpgSigner
             signature.delete();
         }
 
+        // ----------------------------------------------------------------------------
+        // Set up the command line
+        // ----------------------------------------------------------------------------
+
         Commandline cmd = new Commandline();
 
         if ( StringUtils.isNotEmpty( executable ) )
@@ -245,6 +260,10 @@ public class GpgSigner
 
         cmd.createArg().setFile( file );
 
+        // ----------------------------------------------------------------------------
+        // Execute the command line
+        // ----------------------------------------------------------------------------
+
         try
         {
             int exitCode = CommandLineUtils.executeCommandLine( cmd, in, new DefaultConsumer(),
new DefaultConsumer() );



Mime
View raw message