On Thu, Mar 01, 2012 at 03:09:41PM +0000, sebb wrote: > On 1 March 2012 14:01, Gilles Sadowski <gil...@harfang.homelinux.org> wrote: > > On Thu, Mar 01, 2012 at 02:46:33AM +0000, sebb wrote: > >> On 29 February 2012 23:04, Gilles Sadowski <gil...@harfang.homelinux.org> > >> wrote: > >> > Hi. > >> > > >> > Trying the following command (from the wiki "UsingNexus" page): > >> > > >> > $ mvn release:prepare -DdryRun=true > >> > > >> > Getting to the signing step: > >> > ---CUT--- > >> > You need a passphrase to unlock the secret key for > >> > user: "Gilles Sadowski (ASF code signing) <er...@apache.org>" > >> > 4096-bit RSA key, ID 1E22D5B8, created 2012-02-28 > >> > > >> > Enter passphrase: [INFO] gpg: gpg-agent is not available in this session > >> > > >> > You need a passphrase to unlock the secret key for > >> > user: "Gilles Sadowski (ASF code signing) <er...@apache.org>" > >> > 4096-bit RSA key, ID 1E22D5B8, created 2012-02-28 > >> > > >> > Enter passphrase: [INFO] gpg: Invalid passphrase; please try again ... > >> > > >> > You need a passphrase to unlock the secret key for > >> > user: "Gilles Sadowski (ASF code signing) <er...@apache.org>" > >> > 4096-bit RSA key, ID 1E22D5B8, created 2012-02-28 > >> > > >> > Enter passphrase: [INFO] gpg: gpg-agent is not available in this session > >> > [and again...] > >> > ---CUT--- > >> > > >> > When I try with this command: > >> > > >> > $ mvn -DdryRun=true -Dgpg.keyname=er...@apache.org \ > >> > -Darguments="-Dgpg.keyname=er...@apache.org" \ > >> > -Prelease release:prepare > >> > >> Dunno who wrote that, but it surely should not be necessary to provide > >> the keyname twice? > >> One of the parameters must surely be redundant, or the release plugin > >> is even worse than I thought ... > > > > In the document, it is presented as the alternative to > > > > $ mvn release:prepare -DdryRun=true > > > > which behaves exactly the same (i.e. does not work here as indicated above > > and below, in a way depending on the presence or not of "-Prelease"). > > What does <<in a way depending on the presence or not of "-Prelease">> mean?
It means what I described in the previous message (and is still quoted here): with "-Prelease" it picks the key name and asks for the passphrase and loops infinitely saying that the passphrase is wrong (cf. quote above). If I didn't specify "-Prelease", it is stuck indefinitely (cf. quote below). > If you have only put the gpg.keyname in the release profile, the > setting won't be available unless the profile is activated. > I've no idea whether the release plugin activates the release profile > if dryRun is true. I have created a "release" profile in my own "settings.xml". > Properties have to be in profiles, but you can create a profile that > is active by default for any properties you want always to be defined. I don't know how to do that. Before trying to prepare that release I didn't have a "settings.xml" file. What is in there was copied from the document "UsingNexus". But it seems that is not sufficient to make a release, hence the document is not suitable for a release process newbie like me. > >> > >> > It gets stuck[1] after printing > >> > ---CUT--- > >> > INFO] [INFO] Building zip: > >> > /home/eran/devel/SVN/commons-math/trunk/target/commons-math3-3.0-SNAPSHOT-bin.zip > >> > [INFO] [INFO] > >> > [INFO] [INFO] --- maven-site-plugin:3.0:attach-descriptor > >> > (attach-descriptor) @ commons-math3 --- > >> > [INFO] [INFO] > >> > [INFO] [INFO] --- maven-gpg-plugin:1.4:sign (sign-artifacts) @ > >> > commons-math3 --- > >> > ---CUT--- > >> > >> Have you managed to get the following working? > >> > >> $ mvn package gpg:sign -DskipTests > >> > >> Put the gpg.keyname in settings.xml. > >> If you have more than one, put them in profiles. > > > > Yes, that works. [With the <gpg.keyname> in a profile named "release".] > > It prompts for the pass phrase and finishes successfully. > > That's a bit odd, because I don't think the release profile will be activated. It works because I've deduced that everytime I need the key, I must add "-Prelease" on command line. If there is another way, one cannot deduce it from the snippets in "UsingNexus". > > However, I suppose if you only have one key it might pick that. No, it doesn't. > [...] Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org