Skip to content

Fix sources-jar signing: attach-sources ran after gpg:sign, not before - #146

Merged
bernardladenthin merged 1 commit into
mainfrom
claude/llm-wiki-architecture-plan-0nvriu
Jul 15, 2026
Merged

Fix sources-jar signing: attach-sources ran after gpg:sign, not before#146
bernardladenthin merged 1 commit into
mainfrom
claude/llm-wiki-architecture-plan-0nvriu

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • The real v1.1.0 release attempt failed Sonatype Central's deployment validation: "Missing signature for file: *-sources.jar" on all three real modules (srcmorph, srcmorph-cli, srcmorph-maven-plugin). Nothing was published — Central's validator rejects an incomplete bundle before it ever goes live.
  • Root cause: all three modules bound maven-source-plugin's attach-sources execution to the verify phase instead of package. maven-gpg-plugin's sign-artifacts execution (release profile) is also bound to verify; package always runs before verify in the lifecycle, but within the same phase execution order follows declaration/inheritance order — the parent-inherited gpg execution ran before the child's own attach-sources, so gpg signed only the main jar + javadoc jar + pom, silently omitting the sources jar.
  • This was never caught locally because every prior dry run used -Dgpg.skip=true specifically to avoid real signing — which also skipped the real execution-order interaction between these two plugins.
  • Fix: bind attach-sources to package (its own goal default phase) in all three modules.

Test plan

  • Generated a throwaway local GPG key and ran the real release build (mvn -P release verify -DskipTests -Dgpg.keyname=..., no skip=true) to actually exercise signing
  • Confirmed via output: srcmorph and srcmorph-maven-plugin now sign 4 files each (was 3 — main jar, sources jar, javadoc jar, pom); srcmorph-cli signs 5 (was 4 — includes the fat jar); the relocation stub signs its 1 pom
  • Confirmed every module's target/ now has a *-sources.jar.asc on disk
  • mvn clean verify from repo root — BUILD SUCCESS
  • CI green on this branch (pending)

Related issues / PRs

Follow-up to #144 and #145 — fixes the failure from the first real v1.1.0 release attempt (run 29454140213).

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes

Generated by Claude Code

…existed

All three real modules bound maven-source-plugin's attach-sources
execution to the verify phase instead of package. maven-gpg-plugin's
sign-artifacts execution (release profile) is also bound to verify, and
package always runs before verify - but within the SAME phase, execution
order follows declaration/inheritance order, and the parent-inherited
gpg execution ran before the child's own attach-sources. gpg therefore
signed only the main jar + javadoc jar + pom, silently omitting the
sources jar on every module.

This caused the first real v1.1.0 release attempt to fail Sonatype
Central's deployment validation ("Missing signature for file:
*-sources.jar" on all three real modules) - caught only on that real
attempt, since every prior local dry run used -Dgpg.skip=true, which
also skips the real execution-order interaction between these two
plugins.

Fix: bind attach-sources to package (its own goal default) in all three
modules. Verified with a real throwaway GPG key (not skip=true): gpg now
signs 4 files for srcmorph and srcmorph-maven-plugin (was 3), 5 for
srcmorph-cli (was 4, includes the fat jar), and every module's target/
now has a *-sources.jar.asc on disk. Full `mvn clean verify` still
passes.
@bernardladenthin
bernardladenthin merged commit 088615e into main Jul 15, 2026
8 of 14 checks passed
@bernardladenthin
bernardladenthin deleted the claude/llm-wiki-architecture-plan-0nvriu branch July 15, 2026 22:32
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.

2 participants