Skip to content

Replace mvn help:effective-pom with git-pkgs/pom binary#1581

Open
andrew wants to merge 1 commit into
mainfrom
use-git-pkgs-pom
Open

Replace mvn help:effective-pom with git-pkgs/pom binary#1581
andrew wants to merge 1 commit into
mainfrom
use-git-pkgs-pom

Conversation

@andrew
Copy link
Copy Markdown
Member

@andrew andrew commented Apr 27, 2026

Swaps the JVM-based mvn help:effective-pom shell-out for pom (https://github.com/git-pkgs/pom), a pure-Go effective-POM resolver.

generate_effective_pom now pipes the POM bytes to pom -f - -xml -repo <registry_url> and reads the merged XML back on stdout. The contract is unchanged (returns an XML string, falls back to the raw input on any error) so Bibliothecary::Parsers::Maven and mapping_from_pom_xml are untouched. Still gated on ENABLE_MAVEN_EFFECTIVE_POM.

The Redis-backed wait_for_maven_capacity / release_maven_capacity throttle is gone since the new binary is a few ms of CPU and a few hundred KB resident, versus ~1-2s and ~128MB per JVM. maven and coreutils are dropped from the Docker image and the pom binary (v0.1.2) is fetched from the GitHub release.

The emitted XML carries groupId, artifactId, version, packaging, name, description, url, licenses, scm, properties, distributionManagement/relocation, and interpolated dependencies. It does not include <repositories> or <distributionManagement> repository URLs, so metadata.repositories will be empty for POMs that only declare those in a parent. The five existing ENABLE_MAVEN_EFFECTIVE_POM-gated tests are still skipped in CI; their expectations around repositories and properties will need a pass when someone runs them locally.

Three new tests cover the happy path through the binary (using the parent-less zio fixture so it's hermetic), the failure fallback, and the disabled-env no-op. CI installs pom from the release tarball so the first of those runs on every push.

@andrew andrew self-assigned this May 13, 2026
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