Skip to content

Cache archive artifacts from Maven repositories - #425

Merged
andrew merged 1 commit into
git-pkgs:mainfrom
gilesw:feat/maven-archive-artifacts
Oct 10, 2026
Merged

andrew merged 1 commit into
git-pkgs:mainfrom
gilesw:feat/maven-archive-artifacts

Conversation

@gilesw

@gilesw gilesw commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

The Maven handler caches only .jar, .war, .ear, .pom, .aar, .klib and .module files. Everything else goes to proxyUpstream, uncached, so distributions published as archives on Maven Central, such as org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.tar.gz, are fetched from upstream on every request.

This adds .zip, .tar.gz, .tgz, .tar.bz2 and .tar.xz to the artifact extensions. They take the same path as jars, including the Gradle Plugin Portal fallback, and are listed under their group:artifact name. Checksums and signatures (.tar.gz.sha512 etc.) still match isMetadataFile first, so they're unchanged.

Tested with go test ./... and golangci-lint run ./... (v2.13.1, 0 issues), and by running the proxy against Maven Central: the first fetch of apache-maven-3.9.9-bin.tar.gz took 1.7s, the second 16ms from cache, and /api/search?ecosystem=maven lists org.apache.maven:apache-maven.

The Maven handler cached only .jar, .war, .ear, .pom, .aar, .klib and
.module files, so distributions published as archives, such as
apache-maven-{version}-bin.tar.gz, were proxied uncached on every request.
.zip, .tar.gz, .tgz, .tar.bz2 and .tar.xz files now go through the artifact
cache like other artifacts.

@andrew andrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The added archive extensions use the existing artifact cache and Gradle Plugin Portal fallback. Checksums and signatures retain their metadata handling.

@andrew
andrew merged commit 579ab79 into git-pkgs:main Oct 10, 2026
6 checks passed
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