Maven GPG Plugin
  1. Maven GPG Plugin
  2. MGPG-9

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
    • 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?
          Hide
          James Shaw added a comment -

          Yes, see MRELEASE-263

          Show
          James Shaw added a comment - Yes, see MRELEASE-263
          Hide
          Martin Todorov added a comment -

          Thanks for the workaround! While it does work, I think somebody needs to update the gpg plugin's documentation and add an example or mention that this is messed up due to the release plugin.
          @Matthias: mvn release:perform -Darguments=-Dgpg.passphrase=thephrase doesn't seem to always work. I actually used that before, but it started hanging for some reason.

          Show
          Martin Todorov added a comment - Thanks for the workaround! While it does work, I think somebody needs to update the gpg plugin's documentation and add an example or mention that this is messed up due to the release plugin. @Matthias: mvn release:perform -Darguments=-Dgpg.passphrase=thephrase doesn't seem to always work. I actually used that before, but it started hanging for some reason.
          Hide
          Javier A. Ortiz Bultron added a comment - - edited

          I still can't make it to work. I tried both work arounds and still have the same outcome. Any ideas?

          When I try it on the command prompt like this:

          Z:\NetBeans\output-handler>mvn -Dgpg.passphrase=pass -Prelease-sign-artifacts -Darguments=-Dgpg.passphrase=pass release:clean release:prepare release:perform

          It still prompts for the password.

          Show
          Javier A. Ortiz Bultron added a comment - - edited I still can't make it to work. I tried both work arounds and still have the same outcome. Any ideas? When I try it on the command prompt like this: Z:\NetBeans\output-handler>mvn -Dgpg.passphrase=pass -Prelease-sign-artifacts -Darguments=-Dgpg.passphrase=pass release:clean release:prepare release:perform It still prompts for the password.

            People

            • Assignee:
              Benjamin Bentmann
              Reporter:
              Alex Karasulu
            • Votes:
              7 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: