"Could not determine gpg version"
Affected version
3.2.6
Bug description
I am setting up central publishing with maven and have added this maven plugin.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
upon trying to deploy i receive this error message "Could not determine gpg version"
I traced this back to this line of the plugin
After reviewing the regex that is used to get the version Pattern.compile("gpg \\([^)]+\\) .+");
And then the regex used to match the value VERSION_PATTERN = Pattern.compile("(\\d+\\.)+(\\d+)")
And reviewing my terminal's gpg --version call
C:\Users\MY_USERNAME>gpg.exe --version
gpg (GnuPG) 2.4.8
libgcrypt 1.11.1
Copyright (C) 2025 g10 Code GmbH
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: C:\Users\MY_USERNAME\AppData\Roaming\gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
I don't see why this failure has occurred in my build. Any help would be appreciated.
My gpg came from gpg4win.org as referenced by gnupg.org
Hey, have you managed to figure this out? The way deploying to maven was changed in 2025, and I'm completely stuck.
@yetyman
Ideally you (two of you) should figure out what is happening... can you run the plugin in debug maybe and paste the output in gist or whatever?