You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2022/07/17 13:49:14 UTC

[maven-gpg-plugin] branch MGPG-86 updated (be0b3b7 -> 3741f9f)

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a change to branch MGPG-86
in repository https://gitbox.apache.org/repos/asf/maven-gpg-plugin.git


    omit be0b3b7  Prevent NullPointerException when executable cannot be run
     add db57eab  (doc) add GHA setup
     add 455750c  [MGPG-88] Require Java 8
     add bb9c79f  [MGPG-83] Require Maven 3.2.5+
     new 3741f9f  [MGPG-86] Prevent NullPointerException when executable cannot be run

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (be0b3b7)
            \
             N -- N -- N   refs/heads/MGPG-86 (3741f9f)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .asf.yaml => .github/dependabot.yml                | 30 ++++++++++++----------
 .../release-drafter.yml                            |  5 ++--
 .../workflows/maven-verify.yml                     | 15 +++++++++--
 .../workflows/release-drafter.yml                  | 13 +++++++---
 pom.xml                                            | 18 ++++++++-----
 .../maven/plugins/gpg/SignAndDeployFileMojo.java   |  9 +++----
 6 files changed, 59 insertions(+), 31 deletions(-)
 copy .asf.yaml => .github/dependabot.yml (75%)
 copy src/it/sign-release-without-passphrase/invoker.properties => .github/release-drafter.yml (84%)
 copy src/it/sign-and-deploy-file-with-pom/invoker.properties => .github/workflows/maven-verify.yml (78%)
 copy src/it/sign-and-deploy-file-with-pom/invoker.properties => .github/workflows/release-drafter.yml (76%)


[maven-gpg-plugin] 01/01: [MGPG-86] Prevent NullPointerException when executable cannot be run

Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch MGPG-86
in repository https://gitbox.apache.org/repos/asf/maven-gpg-plugin.git

commit 3741f9f743addfeb8ef7ceaff387aa5c8f1cdb03
Author: Charles Honton <ch...@proofpoint.com>
AuthorDate: Sun Jun 12 09:48:24 2022 -0600

    [MGPG-86] Prevent NullPointerException when executable cannot be run
---
 src/main/java/org/apache/maven/plugins/gpg/GpgSigner.java        | 4 ++++
 src/main/java/org/apache/maven/plugins/gpg/GpgVersionParser.java | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/maven/plugins/gpg/GpgSigner.java b/src/main/java/org/apache/maven/plugins/gpg/GpgSigner.java
index 3fb0f3e..fd12276 100644
--- a/src/main/java/org/apache/maven/plugins/gpg/GpgSigner.java
+++ b/src/main/java/org/apache/maven/plugins/gpg/GpgSigner.java
@@ -69,6 +69,10 @@ public class GpgSigner
         GpgVersionParser versionParser = GpgVersionParser.parse( executable );
 
         GpgVersion gpgVersion = versionParser.getGpgVersion();
+        if ( gpgVersion == null )
+        {
+            throw new MojoExecutionException( "Could not determine gpg version" );
+        }
 
         getLog().debug( gpgVersion.toString() );
 
diff --git a/src/main/java/org/apache/maven/plugins/gpg/GpgVersionParser.java b/src/main/java/org/apache/maven/plugins/gpg/GpgVersionParser.java
index 12adb71..034807c 100644
--- a/src/main/java/org/apache/maven/plugins/gpg/GpgVersionParser.java
+++ b/src/main/java/org/apache/maven/plugins/gpg/GpgVersionParser.java
@@ -23,6 +23,8 @@ import java.io.IOException;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.maven.plugin.MojoExecutionException;
+
 import org.codehaus.plexus.util.Os;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
@@ -58,6 +60,7 @@ public class GpgVersionParser
     }
 
     public static GpgVersionParser parse( String executable )
+        throws MojoExecutionException
     {
         Commandline cmd = new Commandline();
 
@@ -81,7 +84,7 @@ public class GpgVersionParser
         }
         catch ( CommandLineException e )
         {
-            // TODO probably a dedicated exception
+            throw new MojoExecutionException( "failed to execute gpg", e );
         }
 
         return new GpgVersionParser( out );