Maven 2.x and 3.x GPG Plugin

gpg plugin hangs when it should prompt for the secret key passphrase hangs

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Not A Bug
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Maven 2.0.6, JDK 1.5.0_11, Linux 2.6.x
  • Number of attachments :
    0

Description

When used in conjunction with the release plugin the release:perform command hangs when it should prompt for the secret key passphrase. Interestingly enough when I put the passphrase into the settings.xml file the plugin does not hang. I suspect the prompt is failing to show up.

Issue Links

Activity

Hide
Christophe Lallement added a comment -

Hi,
it's the same thing with mvn:prepare (passprase pass as property) but it seems gpg wait for a pass phrase without prompting.

tested with maven 2.2.0.

Show
Christophe Lallement added a comment - Hi, it's the same thing with mvn:prepare (passprase pass as property) but it seems gpg wait for a pass phrase without prompting. tested with maven 2.2.0.
Hide
Christophe Lallement added a comment -

I find a workaround:

it seems that mvn:release fork the maven command and additionnal args are not passed to the new command.
just add this option on commande line:

> mvn -Dgpg.passphrase="xxxxxxx" -Darguments="-Dgpg.passphrase=xxxxxxxxx" release:perform

it works fine for me (same tips for mvn:perform)

Regards
Christophe

Show
Christophe Lallement added a comment - I find a workaround: it seems that mvn:release fork the maven command and additionnal args are not passed to the new command. just add this option on commande line: > mvn -Dgpg.passphrase="xxxxxxx" -Darguments="-Dgpg.passphrase=xxxxxxxxx" release:perform it works fine for me (same tips for mvn:perform) Regards Christophe
Hide
Johan Walles added a comment - - edited

MRELEASE-424 has a workaround for this that doesn't require you to store your pass phrases in files.

Add this to the release plugin configuration:

<mavenExecutorId>forked-path</mavenExecutorId>

I tried it and it works. Cred to Benjamin Bentmann.

Show
Johan Walles added a comment - - edited MRELEASE-424 has a workaround for this that doesn't require you to store your pass phrases in files. Add this to the release plugin configuration:
<mavenExecutorId>forked-path</mavenExecutorId>
I tried it and it works. Cred to Benjamin Bentmann.
Hide
Benjamin Bentmann added a comment -

While surely annoying, this is not an issue in the GPG Plugin itself but the Release Plugin. For the time being, I added some documentation to the GPG Plugin that points out a workaround.

Show
Benjamin Bentmann added a comment - While surely annoying, this is not an issue in the GPG Plugin itself but the Release Plugin. For the time being, I added some documentation to the GPG Plugin that points out a workaround.
Hide
Matthias Weßendorf added a comment -

Looks like we have to use something like

mvn release:perform -Darguments=-Dgpg.passphrase=thephrase

when using gpg plugin w/ release plugin.

Question is: is there a release plugin bug ticket for this annoying issue?

Show
Matthias Weßendorf added a comment - Looks like we have to use something like mvn release:perform -Darguments=-Dgpg.passphrase=thephrase when using gpg plugin w/ release plugin. Question is: is there a release plugin bug ticket for this annoying issue?

People

Vote (7)
Watch (9)

Dates

  • Created:
    Updated:
    Resolved: