Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LUCENE-9997: Collect signed maven artifacts if -Psign is passed. #392

Merged
merged 2 commits into from Oct 18, 2021

Conversation

dweiss
Copy link
Contributor

@dweiss dweiss commented Oct 18, 2021

No description provided.

@dweiss dweiss requested a review from janhoy October 18, 2021 08:02
@janhoy
Copy link
Contributor

janhoy commented Oct 18, 2021

I run the build with this patch, but get errors

> Task :lucene:backward-codecs:javadocJar
Caching disabled for task ':lucene:backward-codecs:javadocJar' because:
  Build cache is disabled
Task ':lucene:backward-codecs:javadocJar' is not up-to-date because:
  Output property 'archiveFile' file /Users/janhoy/git/lucene/lucene/backward-codecs/build/libs/lucene-backward-codecs-9.0.0-javadoc.jar has been removed.
:lucene:backward-codecs:javadocJar (Thread[Execution worker for ':' Thread 6,5,main]) completed. Took 0.072 secs.
:lucene:backward-codecs:signSignedJarsPublication (Thread[Execution worker for ':' Thread 6,5,main]) started.

> Task :lucene:backward-codecs:signSignedJarsPublication FAILED
Caching disabled for task ':lucene:backward-codecs:signSignedJarsPublication' because:
  Build cache is disabled
Task ':lucene:backward-codecs:signSignedJarsPublication' is not up-to-date because:
  Task has failed previously.
:lucene:backward-codecs:signSignedJarsPublication (Thread[Execution worker for ':' Thread 6,5,main]) completed. Took 0.002 secs.
[...]
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':lucene:backward-codecs:signSignedJarsPublication'.
> Cannot perform signing task ':lucene:backward-codecs:signSignedJarsPublication' because it has no configured signatory

@janhoy
Copy link
Contributor

janhoy commented Oct 18, 2021

I made the build pass when trying the java-based signing (-Psign -Psigning.keyId="xxxxxxxx" -Psigning.password=$GPGPASS -Psigning.secretKeyRingFile=$HOME/.gnupg/secring.gpg), but it does not work for gpg (-Psign -PuseGpg -Psigning.gnupg.keyName="xxxxxxxx" -Psigning.gnupg.passphrase=$GPGPASS)

@dweiss
Copy link
Contributor Author

dweiss commented Oct 18, 2021

Eh. Ok, I'll take another look. It's all a bit of a black-box with those plugins...

@dweiss
Copy link
Contributor Author

dweiss commented Oct 18, 2021

I've corrected the setup to configure the signing plugin across all projects - this should fix the problem. It works for me locally (with gpg), although on Windows it displays concurrent lock warnings (multiple threads trying to sign at the same time). I don't think it's a problem.

It also made me think whether we need two options... perhaps -Psign could be an alias for the java-based signer and -Psign=gpg could be used to indicate signing via GPG? One option less to remember? Can be done later as well.

@dweiss dweiss merged commit c4c3c32 into apache:main Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants