Skip to content

chore: drop optional SHA256/SHA512 checksums from Maven Central deploy - #106

Open
marioserrano09 wants to merge 1 commit into
mainfrom
chore/reduce-maven-central-file-count
Open

marioserrano09 wants to merge 1 commit into
mainfrom
chore/reduce-maven-central-file-count

Conversation

@marioserrano09

Copy link
Copy Markdown
Contributor

Why

Maven Central now tracks monthly file-count usage per organization (soft-limit phase since
June 16 2026, enforcement starts October 1 2026 — docs).
Our last release (v26.9.0) landed at ~1002 files, already over the current 1000 threshold shown
in the Usage Center.

What

Set <checksums>required</checksums> on central-publishing-maven-plugin — Central's own
requirements doc only mandates MD5+SHA1
per file; SHA256/SHA512 are explicitly optional. The plugin defaults to generating all four.

What I checked before touching this

  • Can't drop sources.jar/javadoc.jar: mandatory for any non-pom packaging, verified
    against Sonatype's requirements doc.
  • Can't drop .asc signatures or .md5/.sha1: also mandatory.
  • Pom-packaged aggregator modules (11 of them) aren't wasting anything already: checked the
    v26.9.0 deploy log -- javadoc:jar/source:jar self-skip for packaging=pom (produce
    nothing), those modules only ever stage .pom + .pom.asc + checksums.

So checksums=required is the only available reduction that doesn't drop something Central
actually requires.

Impact

Per jar-packaged module: 24 → 16 files (-33%). Per pom-packaged aggregator: 6 → 4. Across ~51
modules that's roughly -340 files per release.

Further reduction (not in this PR, needs a product call)

excludeArtifacts could stop publishing modules nobody consumes as a standalone Maven
dependency, if any exist -- that changes what's actually published, not just metadata overhead,
so it needs someone who knows the intended public API surface to decide, not something to
infer from the build alone.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UcARdenC1Sk5EVpkzboH9W

Maven Central only requires MD5 + SHA1 checksums per file (SHA256/SHA512
are accepted but explicitly optional per Sonatype's own publishing
requirements doc). central-publishing-maven-plugin defaults to
generating all four; set checksums=required to generate only the
mandatory two.

Per component this drops file count from 24 to 16 for a jar-packaged
module (-33%), and from 6 to 4 for a pom-packaged aggregator. Verified
against a real deploy log (v26.9.0): jar-packaged modules stage
jar/sources.jar/javadoc.jar/pom x 6 files each; pom-packaged aggregators
(11 of them) correctly already skip javadoc/sources (maven-javadoc-plugin
and maven-source-plugin self-skip for packaging=pom) and only stage
pom+asc+checksums -- no waste there, this checksums setting is the only
available lever without dropping something Central actually requires
(sources.jar/javadoc.jar/.asc signatures/.md5+.sha1 are all mandatory
for non-pom packaging).

Relevant with Maven Central's new per-organization monthly file-count
tracking (soft-limit phase now, enforcement starts Oct 1 2026) --
see https://central.sonatype.org/publish/maven-central-publishing-limits/

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UcARdenC1Sk5EVpkzboH9W

This branch has not been deployed

No deployments
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.

1 participant