| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This attempts to document the new recommended configuration to sign artifacts with the maven-gpg-plugin as part of the deploy process. It imitates this PR from the maintainer of the maven-gpg-plugin: https://github.com/xerial/sqlite-jdbc/pull/1082/files Notes that this requires the maven-gpg-plugin version 3.2.0 or above, not sure if this is worth adding to the documentation as I expect this guide will mostly be followed by people setting up a new project (hopefully using the latest version of the plugin by default). @cstamas I hope I got it right, feel free to suggest any improvements
There was a problem hiding this comment.
LGTM, but this would work with 3.2.0 m-gpg-p only of course.
Sorry, something went wrong.
|
With the release of the 3.2.1 version of the maven-gpg-plugin, this documentation update is less important as 3.2.1 will continue to work like the previous versions. However, on the long term, this would likely still be a better choice than the current set up, as it removes the dependency on an external GPG agent. Arguably setup-java shouldn't have anything to do with setting up a GPG environment as it's unrelated to Java. One downside of this method is the additional -Dgpg.signer=bc that needs to be added to mvn package. Perhaps that's something that could be removed in the future, if the maven-gpg-plugin is able to detect by itself that it is running in an environment where GPG hasn't been set up at all. |
Sorry, something went wrong.
|
Note: 3.2.1 is out, that restores "old way" working. Still, I'd emphasize that with 3.2.x plugins, the "preferred" way of signing on CI like environments is using BC and passing secrets (key and passphrase) as environment variables. No more hoops and loops, like installing key into GnuPG and getting passphrase via crafted settings.xml should be needed. Ideally, no secret should get onto any disk/persistent storage. |
Sorry, something went wrong.
… to work (#260) related issue : #257 see a few related discussions here * https://issues.apache.org/jira/browse/MGPG-90 * actions/setup-java#608
… GPG signing (#261) see the related issue #257 see the related docs PR actions/setup-java#608
|
The recommendation is useful, but current docs intentionally cover the setup-java-managed GPG path. Recommendation: decide whether to document the BC signer flow as an additional/alternative path in a fresh docs PR. |
Sorry, something went wrong.
There was a problem hiding this comment.
Updates the Maven publishing documentation to reflect a newer recommended GPG-signing approach (using maven-gpg-plugin’s Bouncy Castle signer) rather than importing a key into the runner’s GPG keychain via setup-java.
Changes:
| File | Description |
|---|---|
| docs/advanced-usage.md | Refreshes the Maven Central publishing example to use maven-gpg-plugin’s BC signer workflow and updates the accompanying settings.xml examples accordingly. |
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Remove leftover gpg.passphrase server from the GitHub Packages settings.xml example - Clarify that the bc signer needs no gpg binary, keychain import, or pinentry loopback - Document the legacy gpg-private-key/gpg-passphrase input path alongside it - Note the MAVEN_GPG_KEY must be an ASCII-armored (TSK) secret key Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 50be9bf4-3414-43f2-8454-03c2d9e61973
Restore a complete, clearly-labeled legacy path (setup-java gpg-private-key/ gpg-passphrase inputs) for maven-gpg-plugin < 3.2.0 or the gpg executable: full workflow YAML, the generated gpg.passphrase server, and the --pinentry-mode loopback pom.xml snippet. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 50be9bf4-3414-43f2-8454-03c2d9e61973
| Back | FazBrowse Home | New Git URL |
This attempts to document the new recommended configuration to sign artifacts with the maven-gpg-plugin as part of the deploy process.
It imitates this PR from the maintainer of the maven-gpg-plugin: https://github.com/xerial/sqlite-jdbc/pull/1082/files
Notes that this requires the maven-gpg-plugin version 3.2.0 or above, not sure if this is worth adding to the documentation as I expect this guide will mostly be followed by people setting up a new project (hopefully using the latest version of the plugin by default).
@cstamas I hope I got it right, feel free to suggest any improvements
Related issue:
might be related to #600?
see also https://issues.apache.org/jira/browse/MGPG-90?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&focusedCommentId=17825880
Check list: